It seems that when my app loads, it does not know its current orientation:
UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation];
if (o
I think this will work:
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];UIInterfaceOrientation orientation = [UIDevice currentDevice].orientation;
According to the UIDevice reference:
Quote:
"The value of this property always returns 0 unless orientation notifications have been enabled by calling beginGeneratingDeviceOrientationNotifications"
I had initially assumed that this property contained the current orientation at all times, but not so, apparently. I guess that turning on notifications is being handled for us behind the scenes in other situations where the orientation property is typically accessed, so it wasn't obvious that this needs to be done manually inside the app delegate