Launch Image does not show up in my iOS App

前端 未结 28 1566
逝去的感伤
逝去的感伤 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:52

    There is a file 'LaunchScreen.xib' automatically added to your project Deleting this will shift xCode to using your Default images in Images.xcassets

    edited to add go to App Icons and Launch Images Launch Screen File should be blank/emtpy

    0 讨论(0)
  • 2020-12-02 04:54

    Xcode 8:

    Images used in LaunchScreen.xib should not be on a .xcassets, try dropping them in the bundle.

    Looks like that by the time that the .xib gets loaded, the images in the .xcassets are not yet available.

    EDIT: For some opaque reason after adding some localizations, launch screen stopped working, now it works with an image from the assets, extremely weird.

    0 讨论(0)
  • 2020-12-02 04:55

    There is a bug where Xcode 6 launch images stored in asset files cause iphone landscape only apps on iOS7/iOS8 to display a black launch image. iPad works fine.

    http://www.raywenderlich.com/forums/viewtopic.php?f=2&t=10868

    Solution: Use the new Launchscreen.xib for ios8+ onwards. (it is far better)

    For ios7 devices to work you simply turn off launch images source and use the old school launch images file names in the plist

    iphone5 - Default-568h@2x.png 
    iphone4s - Default@2x.png
    ipad2 - Default-Landscape~ipad.png
    ipad retina - Default-Landscape@2x~ipad.png
    

    Painful but works. B

    0 讨论(0)
  • 2020-12-02 04:56

    I have tried everything but solution was extremely simple. Just use .jpg file instead of .png on your LaunchScreen.storyboard. It seems like iOS does not render .png file or relatively big image size at launch screen.

    0 讨论(0)
  • 2020-12-02 04:56

    This is worked for me. Click LaunchScreen.storyboard then in the right panel you can select "Is Initial View Controller" check box.

    LaunchScreen.storyboard -> Is Initial View Controller

    0 讨论(0)
  • 2020-12-02 04:58

    Simply removing and reinstalling the app worked for me:

    • Testing in the Simulator

      1. Delete the app in the simulator.
      2. Quit and restart the simulator.
      3. Run the project again in Xcode.

    • Testing on Device

      1. Delete the app from the device.
      2. Run the project again in Xcode.
    0 讨论(0)
提交回复
热议问题