What is the difference between UIDevice orientation and UIInterface orientation?

What is the difference between UIDevice orientation and UIInterface orientation?

Orientation UIDevice: -

    [[UIDevice currentDevice] orientation]

UIInterface orientation: -

    [[UIApplication sharedApplication] statusBarOrientation]
+4
source share
1 answer

Device orientation is the orientation in which the device is located. We can get the device orientation using this call:

[[UIDevice currentDevice] orientation]

This will return one of the following states: UIDeviceOrientationUnknown UIDeviceOrientationPortrait UIDeviceOrientationPortraitUpsideDown UIDeviceOrientationLandscapeLeft UIDeviceOrientationLandscapeRight UIDeviceOrientationFaceUp UIDeviceOrientationFaceDown

FaceUp FaceDown. , . , , , .

, UIInterfaceOrientation . , , . UIInterfaceOrientation , :

[[UIApplication sharedApplication] statusBarOrientation]
+5

Source: https://habr.com/ru/post/1612481/


All Articles