首页 > 其他 > 详细

UIDeviceOrientation和UIInterfaceOrientation中left、right的含义

时间:2015-08-21 11:20:58      阅读:208      评论:0      收藏:0      [点我收藏+]


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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!