2013-05-01 62 views

回答

4

在iOS 5中,您需要在視圖控制器的每個人中實現以下方法。

// Called only in IO 5 and earlier. 
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || 
      interfaceOrientation == UIInterfaceOrientationLandscapeLeft); 
} 

,並設置你的Info.plist

UIInterfaceOrientation「初始界面方向 」到UIInterfaceOrientationLandscapeRight鋪陳在橫向模式下您的看法。

Apple's developer docs

+0

謝謝男人。有效 – 2013-05-01 20:23:59