我只在橫向模式下開發iOS應用程序。我正在加載Launchscreen圖像:[email protected],[email protected],[email protected],[email protected]。iOS應用程序橫向模式啓動圖像不顯示
問題是,無論何時我在iPhone6或6+中啓動應用程序,它都會從iphone5獲取屏幕尺寸。
P.S.我試過使用Images.Xcassets,但它不適用於iPhone < 6.
謝謝。
我只在橫向模式下開發iOS應用程序。我正在加載Launchscreen圖像:[email protected],[email protected],[email protected],[email protected]。iOS應用程序橫向模式啓動圖像不顯示
問題是,無論何時我在iPhone6或6+中啓動應用程序,它都會從iphone5獲取屏幕尺寸。
P.S.我試過使用Images.Xcassets,但它不適用於iPhone < 6.
謝謝。
如果你的程序是唯一的景觀必須在「設備定位」檢查選項「肖像」中的應用程序設置常規選項卡部分。然後,你需要設置方向設置爲所有視圖控制器:
-(BOOL)shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeLeft |
UIInterfaceOrientationMaskLandscapeRight;
}
-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeLeft;
}
在Images.xcassets你需要把所有圖像爲iOS 7 & 8之後,應用程序將適當啓動圖像啓動。請注意,preferredInterfaceOrientationForPresentation
必須等同於啓動圖像方向。
檢查,一切都沒問題。 – alexsc 2014-12-02 09:19:38