开发者

The Idea behind the UIInterfaceOrientaitonLandscapeRight-Left

开发者 https://www.devze.com 2023-04-03 05:39 出处:网络
I\'m very curious about why UIIntefarceOrientation value equals to -LandscapeRight when I rotate the phone t开发者_C百科o left and vice-versa.Here\'s the -LandscapeRight mode:

I'm very curious about why UIIntefarceOrientation value equals to -LandscapeRight when I rotate the phone t开发者_C百科o left and vice-versa.Here's the -LandscapeRight mode:

The Idea behind the UIInterfaceOrientaitonLandscapeRight-Left

and here's the -LandscapeLeft mode:

The Idea behind the UIInterfaceOrientaitonLandscapeRight-Left

Roughly said, before, when the phone was in -Portrait mode the speaker or the top of the phone was pointing up, now it's poiting to left. But why is it -LanscapeRight?


It simply means the user interface has rotated to the right, not the device. Imagine the device still (always pointing upwards) the interface would rotate.


it's all comes from the home button of iphone wheter it will be the position will be according to its home button position like in your upper image the home button on right side os the position is uiinterfaceorientationright and next one is left .


To quote the XCode documentation:

UIInterfaceOrientationLandscapeLeft
The device is in landscape mode, with the device held upright and the home button on the left side. Available in iOS 2.0 and later. Declared in UIApplication.h.

UIInterfaceOrientationLandscapeRight The device is in landscape mode, with the device held upright and the home button on the right side. Available in iOS 2.0 and later. Declared in UIApplication.h.


I thought I'd post my own answer as I understood it totally .As @Magic Bullet Dave said it's the Interface orientation of which is changing according to the device itself. If we take the device and the interface separately, when we rotate the device itself to left then the interface orientation will remain right to the device. So as the name implies it is UIInterfaceOrientationLandscapeRight not UIDeviceOrientationLadscapeRight.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号