0

presentViewControllerを使用してUIWebviewをモーダルに表示するアプリがあります。これで、ルートビューは方向の変更をサポートし、それに応じて回転します。イベントUIApplicationWillChangeStatusBarOrientationNotificationをリッスンします。

ここで、「

                 presentViewController:navController
                  animated:YES
                completion:nil];

私は使用を却下します

                dismissModalViewControllerAnimated:YES];

ここで問題が発生します。iOS6では、これは正常に機能し、モーダルウィンドウは親がどの方向に向いていても表示されます。

iOS 5では、presentViewControllerまたはdismissModalViewControllerAnimatedが強制的にスローします

UIApplicationWillChangeStatusBarOrientationNotification !!

なぜ何かアイデアはありますか?

4

1 に答える 1

3

代わりに、このオリエンテーション通知を使用してみてください。

[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:)
 name:UIDeviceOrientationDidChangeNotification object:[UIDevice currentDevice]];
于 2013-02-26T18:09:00.617 に答える