デバイスが横向きモードで、View Controller をモーダルに表示すると、これは常に縦向きモードで表示されます。これは私が望むものです。
ただし、他のビュー (モーダル表示) が常に横向きモードで表示される理由がわかりません (デバイスの現在の向きが横向きの場合)。使用するコードはすべてのビュー コントローラーで同じであり、xib ファイルの向きのプロパティは常に縦です。
これは、動作するView Controllerをプッシュする方法です(ランドスケープモードでは表示されません):
- (IBAction)showImport:(id)sender
{
CMImportExportViewControlleriPhone *importController = [[CMImportExportViewControlleriPhone alloc] initWithNibName:@"Import-Export-iPhone" bundle:nil];
[importController setLayoutViewController:self];
//[importController setDelegate:self];
[self presentModalViewController:importController animated:YES];
[importController release];
}
ありがとう