アプリデリゲートで UIViewController を self.window.rootViewController としてセットアップします。何らかの理由で、次のようなルート ビュー コントローラーからモーダルとしてサイン ビューを開く必要があります。
self.window.rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext;
[self.window.rootViewController presentModalViewController:signViewC animated:NO];
標識ビューでデバイスの向きを変更すると、ルート ビュー コントローラーの向きが変更されず、標識ビューを閉じた後に誤った向きになります。標識ビューで方向を変更した場合、ルート ビューの方向を変更することはできますか?
ルートコントローラーに次を追加しました:
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
また、モーダル ビューを使用せずにルート ビューを回転すると、自動回転が機能します。