Full warning:
Implicit conversion from enumeration type 'UIInterfaceOrientation' to different enumeration type 'UIDeviceOrientation'
Getting it on the line:
[self orientationChanged:interfaceOrientation];
This is the method:
- (void)orientationChanged:(UIInterfaceOrientation)interfaceOrientation
I can't really understand where this warning is coming from.
UIDeviceOrientation
refers to the physical orientation of the device whereasUIInterfaceOrientation
refers to the orientation of the user interface. When you call your methodyou are most likely passing it a
UIDeviceOrientation
when you should, according to the method, be using aUIInterfaceOrientation
.Just to expand on this point a bit,
UIDeviceOrientation
is a property of theUIDevice
class, and there are these possible values:As for
UIInterfaceOrientation
, it is a property ofUIApplication
and only contains 4 possibilities which correspond to the orientation of the status bar:To get
UIDeviceOrientation
, you useand to get
UIInterfaceOrientation
, you use