iPad方向问题

时间:2010-07-14 10:39:25

标签: ipad

- (void)setOrientation {     UIInterfaceOrientation toOrientation = self.interfaceOrientation;     // toOrientation = [[UIDevice currentDevice] orientation];

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


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


}

}

当我要从纵向位置移动横向位置的iPad时,将执行纵向条件。因此我的屏幕失真。

1 个答案:

答案 0 :(得分:0)

如果您正在谈论自动重新组织的界面以适应其他方向,则应在屏幕旋转时为所有界面元素设置新框架。