Things are easy to handle if the user rotates the device (I handle the call of viewWillTransitionToSize), but the app has to know its initial orientation.
Until now, I have been using the status bar orientation and device orientation
if (UIDeviceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation))
{
//
}
if (INTERFACE_IS_PHONE && UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation) ) {
//
}
UIInterfaceOrientation orientation = [UIDevice currentDevice].orientation;
if (INTERFACE_IS_PHONE && UIDeviceOrientationIsPortrait(orientation) ) {
//
}
above methods showing wrong orientation ,any ?