私のアプリは縦向きのみのアプリです。ランドスケープ モードでサブ ビューを追加する必要があります。新しいビューを追加するために、iOS 6 で以下の向きを設定しました。
-(NSUInteger)supportedInterfaceOrientations
{
NSUInteger options = UIInterfaceOrientationMaskAll;
if (self.inAppBrowserOrientation)
{
if (self.inAppBrowserOrientation == UIInterfaceOrientationLandscapeLeft || self.inAppBrowserOrientation == UIInterfaceOrientationLandscapeRight)
options = UIInterfaceOrientationMaskLandscape;
return options;
}
}
ビューはポートレート モードで追加されます。向きでは、このビューは横向きモードでのみ回転しますが、これは予想どおりです。
ビューを追加して初めて、ポートレート モードで追加されるのはなぜですか? self.inAppBrowserOrientation
がありながらUIInterfaceOrientationLandscapeRight
。