As discussed in other answers, you need an Orientation interface, not a deviceOrientation.
The easiest way to get to this is to use the Orientation property interface on your UIViewController. (Therefore, most often it is simple: self.interfaceOrientation will do).
Possible values:
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait, UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown, UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight, UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
Remember: Left orientation is entered by turning the device to the right.
Bjinse Feb 07 2018-12-12T00: 00Z
source share