portrait:
portrait原意是肖像画,因为肖像画要竖着挂,所以portrait就是纵向的意思。
Landscape原意是风景画,风景画一般是横着挂,所以Landscape就是指手机横向。
UIDeviceOrientationLandscapeLeft //Device oriented horizontally, home button on the right
意思是:device在Portrait状态下, 向左转。所以home button就在右边了。
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
是因为设备向左转后,显示内容要正常显示,就需要向右转才可以。
typedef NS_ENUM(NSInteger, UIDeviceOrientation) {
UIDeviceOrientationUnknown,
UIDeviceOrientationPortrait, // Device oriented vertically, home button on the bottom
UIDeviceOrientationPortraitUpsideDown, // Device oriented vertically, home button on the top
UIDeviceOrientationLandscapeLeft, // Device oriented horizontally, home button on the right
UIDeviceOrientationLandscapeRight, // Device oriented horizontally, home button on the left
UIDeviceOrientationFaceUp, // Device oriented flat, face up
UIDeviceOrientationFaceDown // Device oriented flat, face down
};
以及如下四种界面方向:
typedef NS_ENUM(NSInteger, UIInterfaceOrientation) {
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
};
版权声明:本文为博主原创文章,未经博主允许不得转载。
UIDeviceOrientation和UIInterfaceOrientation中left、right的含义
原文:http://blog.csdn.net/gaoyp/article/details/47830735