2010-07-14 189 views
0

- (void)setOrientation UIInterfaceOrientation toOrientation = self.interfaceOrientation; // toOrientation = [[UIDevice currentDevice] orientation];iPad方向問題

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


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


} 

}

當我要在景觀位置從縱向位置移動的iPad,是得到執行肖像條件。由於這個原因,我的屏幕被扭曲了。

+0

你能否明確說明你的問題是什麼? – jrtc27 2010-07-14 11:18:14

+0

只是爲了幫助您刪除一些代碼,您可以使用此功能: UIInterfaceOrientationIsLandscape(yourOrientation) – CedricSoubrie 2011-03-30 15:58:05

回答

0

如果您正在討論自動重新組織以適應其他方向的界面,則應在屏幕旋轉時爲所有界面元素設置一個新框架。