2014-12-02 77 views

回答

0

如果你的程序是唯一的景觀必須在「設備定位」檢查選項「肖像」中的應用程序設置常規選項卡部分。然後,你需要設置方向設置爲所有視圖控制器:

-(BOOL)shouldAutorotate 
{ 
    return YES; 
} 

-(NSUInteger)supportedInterfaceOrientations 
{ 
    return UIInterfaceOrientationMaskLandscapeLeft | 
    UIInterfaceOrientationMaskLandscapeRight; 
} 

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 
{ 
    return UIInterfaceOrientationLandscapeLeft; 
} 

在Images.xcassets你需要把所有圖像爲iOS 7 & 8之後,應用程序將適當啓動圖像啓動。請注意,preferredInterfaceOrientationForPresentation必須等同於啓動圖像方向。

相關問題