これは重複した質問ではありません。最終的な実用的なソリューションはまだ提供されていません。私が回答を受け入れるか、これに対する独自の解決策を見つけて提供するまで、この質問を閉じないでください。ありがとう!
================================================== ================ Xcode 4.5.1 を使用して、5 つのタブを含むタブバー アプリを作成しました。各タブには UINavigationController が含まれています。そのため、アプリ全体を縦向きモードで表示する必要がありますが、唯一の ViewController (全画面表示で開き、横向きモードで表示するための「モーダル」VC) を除きます。
これは iOS5 で完全に機能しました。特定の ViewController で次のコードを使用しただけです。
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
しかし、アプリがクラッシュし、次のエラーが発生します。
Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation',
reason: 'preferredInterfaceOrientationForPresentation must return a supported interface orientation!'
助言がありますか?