UIInterfaceOrientation,表示页面内容朝向,留意UIInterfaceOrientation和UIDeviceOrientation的关系,此中UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,这是由于:
This is because rotating the device to the left requires rotating the content to the right.
不消特殊细究两者之间关系,我们只须要根据须要设置好UIInterfaceOrientation即可,通过
[UIApplication shareApplication] statusBarOrientation]可以获取当前状态栏朝向。
typedef NS_ENUM(NSInteger, UIInterfaceOrientation) { UIInterfaceOrientationUnknown = UIDeviceOrientationUnknown, UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait, UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown, UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight, UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft};UIInterfaceOrientationMask