UIInterfaceOrientation
!= UIDeviceOrientation
. UIInterfaceOrientation
is declared as ...
typedef enum : NSInteger {
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
} UIInterfaceOrientation;
... portrait contains same values / numbers, but landscape variants are swapped, etc. You didn't show your code, so, I can just assume, that you're mixing these two things together.
Is there any reason why you're not using willRotateTo...
, willAnimateRotation...
, didRotateFrom...
methods of UIViewController
?