iPad定位问题

iPad定位问题,ipad,Ipad,-(无效)设置方向 { UIInterfaceOrientation TooOrientation=自我界面定向; //TooOrientation=[[UIDevice currentDevice]方向] if (toOrientation == UIInterfaceOrientationLandscapeLeft || toOrientation == UIInterfaceOrientationLandscapeRight ) { }else if(toOrientation

-(无效)设置方向 { UIInterfaceOrientation TooOrientation=自我界面定向; //TooOrientation=[[UIDevice currentDevice]方向]

if (toOrientation == UIInterfaceOrientationLandscapeLeft ||
    toOrientation == UIInterfaceOrientationLandscapeRight )
{


}else if(toOrientation == UIInterfaceOrientationPortrait
     || toOrientation  == UIInterfaceOrientationPortraitUpsideDown){


}
}


当我将iPad从纵向位置移动到横向位置时,纵向条件被执行。因此,我的屏幕被扭曲。

如果你说的是界面被自动重新组织以适应其他方向,那么当屏幕旋转时,你应该为所有界面元素设置一个新的框架。

你能澄清你的问题是什么吗?只是为了帮你删除一些代码,您可以使用以下功能:UIInterfaceOrientationIsLandscape(yourOrientation)