Launch Image does not show up in my iOS App

前端 未结 28 1638
逝去的感伤
逝去的感伤 2020-12-02 04:11

I want to get a simple launch screen to show in my app, built using Xcode 6.0.1.

I have added a launch screen in two ways: As an XIB (with the default name, LaunchSc

28条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 04:42

    * (Xcode 7.2 / Deployment Target 7.0 / Landscape Orientation Only) *

    I know is an old question but with Xcode 7.2 I'm still getting the message and I fixed with this:

    1) Select PORTRAIT and both landscapes. Add "Launch Images Source" and "Launch Screen File"

    2) In your Launch Image select iPhone "8.0 and Later" and "7.0 and Later".

    3) Add this code in your appDelegate:

    #if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
    - (NSUInteger)supportedInterfaceOrientations
    {
        return UIInterfaceOrientationMaskLandscape;
    }
    #else
    - (UIInterfaceOrientationMask)application:(UIApplication *)application     supportedInterfaceOrientationsForWindow:(UIWindow *)window
    {
        return (UIInterfaceOrientationMaskLandscape);
    }
    #endif
    

    4) Add this on your ViewController

    #if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
    - (NSUInteger)supportedInterfaceOrientations
    #else
    - (UIInterfaceOrientationMask)supportedInterfaceOrientations
    #endif
    {
         return UIInterfaceOrientationMaskLandscape;
    }
    

    I hope help to somebody else.

提交回复
热议问题