It seems that when my app loads, it does not know its current orientation:
UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation];
if (o
Try this one. it's work for me. gnarly at that time of didfinishedlaunch method not detect device orientation. its take by default as a portrait. so. i am using to check stats bar orientation . i test this code. put it in didfinishedlaunch method in appdeleget.
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
if(orientation == 0) {//Default orientation
//UI is in Default (Portrait) -- this is really a just a failsafe.
NSLog("for portrait");
}else if(orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown)
{
NSLog("portrait");
}else if(orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight)
{
NSLog("Landscap");
}