UIAlertViewの向き

plistでUIOrientationをLandscapeにしている状態で、UIAlertViewを表示すると、残念なことに縦向きに表示されてしまう。

どうやら、UIAlertViewの向きはStatusBarの向きに依存しているようで、StatusBarもLandscapeにしてやらないといけないらしい。

AppDelegateのapplicationDidFinishLaunchingで、向きを変えてあげるとよい。

[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeRight;

via UIAlertView didn’t rotate in landscape mode

コメントを残す