两者之间有什么区别?在哪种情况下,我应该使用哪一种?
答案 0 :(得分:0)
typedef NS_ENUM(NSInteger, UIInterfaceOrientation) {
UIInterfaceOrientationUnknown = UIDeviceOrientationUnknown,
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
}
从上面看,UIInterfaceOrientationLandscapeLeft的差异等于UIDeviceOrientationLandscapeRight,UIInterfaceOrientationLandscapeRight等于UIDeviceOrientationLandscapeLeft。 当设备landscapeLeft时,界面应向右旋转以保持内容不反转。