iPad orientation Problem
-(void) setOrientation { UIInterfaceOrientation toOrientation = self.interfaceOrientation; //toOrientation = [[UIDevice currentDevice] orientation];
if (toOrientation == UIInterfaceOrientationLandscapeLeft ||
toOrientation == UIInterfaceOrientationLandscapeRight )
{
}else if(toOrientation == UIInterfaceOrientationPortrait
|| toOrientation == UIInterfaceOrientationPortraitUpsideDown){
}
}
When i am going to move iPad in Landscape position from Portrait position, portrait condition is get executed. Due开发者_高级运维 to this my screen is distorted.
If you're talking about the interface being automatically reorganized to fit the other orientation, you should set a new frame to all interface elements when the screen gets rotated.
精彩评论