ああ!私はiOS5でタブバーの回転の問題を最終的に解決しましたが、iOS6とxcodeは問題を解決したようです...これが私が持っているものです:
ターゲットアプリの概要は次のとおりです。サポートされているインターフェースの向き-Portraint、Landscape Left、Landscape Right
アプリのすべてのシングルビューには、次の方法があります。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
return ((interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown) &&
(interfaceOrientation != UIInterfaceOrientationLandscapeLeft) &&
(interfaceOrientation != UIInterfaceOrientationLandscapeRight));
} else {
return YES;
}
}
- (BOOL)shouldAutorotate
{
NSLog(@"am I called1?");
return NO;
}
-(NSUInteger)supportedInterfaceOrientations{
NSLog(@"am I called?");
return UIInterfaceOrientationMaskPortrait;
}
タブバーの一部ではないビューでは、回転がブロックされます。タブバーのすべてのビュー(5つあります)では、アプリはShouldAutorotateを呼び出さないため、回転します。サポートされているInterfaceOrientationsは、ビューが読み込まれるときに1回呼び出されるようですが、NSLogを取得するため、ビューを切り替えると表示されるときは呼び出されませんが、MaskPortrait設定を無視しているようです。
回転する必要のある単一のビデオプレーヤービューがあるため、ターゲットでランドスケープを有効のままにしておく必要があります(そうすることで問題ありません)
これはiOS6のタブバーのバグですか?ビューの回転を別の方法で無効にする必要がありますか?shouldautorotatetointerfaceorientationはiOS5でうまく機能しました
私はしばらくそれをやってきた
ありがとう、ザック