It seems that when my app loads, it does not know its current orientation:
UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIDeviceOrientationPortrait) {
NSLog(@"portrait");// only works after a rotation, not on loading app
}
Once I rotate the device, I get a correct orientation, but when I load the app, without changing the orientation, it seems that using [[UIDevice currentDevice] orientation]
doesn't know the current orientation.
Is there another way to check this when I first load my app?