これは私の髪をリッピングしています。次のように私のiPadアプリケーションがセットアップされている:UIViewは常にポートレートモードで読み込みます
私のアプリのデリゲートでは、私は、この持っている:ロードされている私の最初のビューコントローラで
Initial Interface Orientation = UIInterfaceOrientationLandscapeLeft
:私は私のするinfo.plistで
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
を私が持っているアプリケーションデリゲートから:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations.
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
私の2番目のビューコントローラでは:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations.
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
最後に、両方のnibのビューは、Interface Builderでlandscapeに設定されています。アプリケーションは、風景モードで起動し、押したときに最初のビューに2番目のビューを割り当てボタンがあります:
self.view = secondView.view;
問題はすべてが風景の中にあるにもかかわらず、新しいビューは常にポートレートモードでロードされているということですが?これに関する助けてください非常に非常に感謝される!
感謝を応答。スクリーンショットはxCode 4ですが、これはxCode 3のどこにありますか? – Peter
@Peter - Info.plistの「サポートされているインターフェイスの向き」キーを見てください。 – Abizern
@Peter、それはxcodeであり、xCodeではありません。 :-) – Moshe