码迷,mamicode.com
首页 > 其他好文 > 详细

UIDeviceOrientation和UIInterfaceOrientation中left、right的含义

时间:2015-08-21 11:22:24      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:uideviceorientation   uiinterfaceorientati   left   right   


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的含义

标签:uideviceorientation   uiinterfaceorientati   left   right   

原文地址:http://blog.csdn.net/gaoyp/article/details/47830735

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!