iOS 8 では、デバイスの向きの検出が追加されましたUIInterfaceOrientationUnknown
(プレリリースのドキュメントはこちらで確認してください) 。
UIInterfaceOrientationUnknown
デバイスの向きを特定できません。
iOS 8.0 以降で利用できます。
typedef enum : NSInteger {
UIInterfaceOrientationUnknown = UIDeviceOrientationUnknown,
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
} UIInterfaceOrientation;
Portrait
私が見る限り、このデバイスは、UpsideDown
、LandscapeRight
およびの 4 つの方法しかありませんLandscapeLeft
。では、デバイスの向きが不明になるのはどのような状況でしょうか?