私は写真ビューコントローラを使っていくつかの写真をポートレートとランドスケープビューで表示しています。私がしたのは-(BOOL)shouldAutorotateToInterfaceOrientation
の方向を以下のコードで編集することですが、xcode(メニューハードウェア>右回転)でテストすると、ビューはランドスケープで回転しません。私がやったことに何か間違っていますか?このビューが回転していない理由は何ですか?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
ビューコントローラは、タブベースのiPhoneアプリケーションの一部であり、このビューはルートビューではありません。これは問題ですか?
[投稿にはサインしないでください] – cmbuckley