Our app consists of Cocos3D and AR. Since upgrading to iOS 8 we had to fix our orientation handling because of the changes Apple brought on us.
However, we still experience some issues that lead me to a rather interesting phenomena (I checked it in our app and in a fresh new project..):
Logging the [UIDevice currentDevice].orientation
,[UIApplication sharedApplication].statusBarOrientation
and [UIScreen mainScreen].bounds.size
shows that when the device is rotated quickly, the device orientation actually changes, however the interface orientation sometimes stays the same and it leads to wrong calculations of the screen bounds... e.g.:
before rotation:
[UIDevice currentDevice].orientation = 1
[UIApplication sharedApplication].statusBarOrientation = 1
[UIScreen mainScreen].bounds.size = 414x736
after first rotation:
[UIDevice currentDevice].orientation = 4
[UIApplication sharedApplication].statusBarOrientation = 4
[UIScreen mainScreen].bounds.size = 736x414
after second rotation:
[UIDevice currentDevice].orientation = 1
[UIApplication sharedApplication].statusBarOrientation = 4
[UIScreen mainScreen].bounds.size = 736x414
Now obviously, after the second rotation, the device is back in portrait mode - well not according to the interface orientation and the screen bounds...
Am I missing something here?