开发者

iPad orientation Problem

开发者 https://www.devze.com 2023-01-07 07:02 出处:网络
-(void) setOrientation { UIInterfaceOrientation toOrientation = self.interfaceOrientation; //toOrientation = [[UIDevice currentDevice] orientation];

-(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.

0

精彩评论

暂无评论...
验证码 换一张
取 消