Adding iOS 7 version of iPhone 4-inch launch image to project breaks launch image when run on iOS 7

后端 未结 3 1498
慢半拍i
慢半拍i 2020-12-31 23:23

I\'m running into a problem on our landscape only app that targets iOS 6 and 7. Xcode gives me the following warning:

An iPhone Retina (4-inch) launc

3条回答
  •  我在风中等你
    2020-12-31 23:37

    XCode is looking for Portrait orientation for iPhone. You need to provide it for the launch image, but don’t let your application to rotate when device is in Portrait mode.
    In order to do this you need to do the following:

    • Go to General -> Deployment Info -> Device Orientation. Deselect Landscape Left and Landscape Right. Select Portrait, then Landscape Left and Landscape Right, order is important!
    • Add the following function to your code (if not yet):

    -(NSUInteger)supportedInterfaceOrientations { return (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight); }

    That’s all!

提交回复
热议问题