Launch Image not showing up in iOS application (using Images.xcassets)

后端 未结 13 800
南方客
南方客 2020-11-30 01:20

I\'m having some trouble getting my launch image to show up in my application.

I have created all the static image files in the Images.xcassets file in an asset set

相关标签:
13条回答
  • 2020-11-30 01:33

    Close the simulator & open it again worked for me

    0 讨论(0)
  • 2020-11-30 01:34

    I've just spent a little while on the same problem, but found the answer, and put it into a Youtube Tutorial

    1. Create your ArtWork Image. 1024x1024 that conforms to Apple's requirements for Appicons and LaunchImages
    2. Set up a folder to hold your newly created Assets.xcassets
    3. Open Asset Creator Pro and drag your new image into it.
    4. Do your app icons first, putting the created file into your new folder.
    5. Using the SAME image, select LaunchImages next, and "Append" the created set into the new, existing Assets.xcassets
    6. Open your XCode project, and delete the eisting - probably empty - Assets.xcassets folder. If you have other files in it, then just delete the Appicons and Launchimages sets.
    7. Drag your newly created Assets into the XCode project, making sure you set the option to Copy the files. Sometimes this can be off! beware.
    8. check what's in the cassets, you should see your new images.
    9. Make sure the line Launch Screen File in your Project settings is BLANK.
    10. Make sure your LaunchScreen storyboard is BLANK. Anything in there and the images wont load.

    test it.

    Watch the video.

    0 讨论(0)
  • 2020-11-30 01:43

    should be empty ! Launch Screen File

    it worked for me

    0 讨论(0)
  • 2020-11-30 01:44

    Working solution. Saved my time and hope it will save yours as well.

    • Make sure your images are accurate size according to Apple Guidelines.
    • Make sure, You will select only one option , either launch screen file or Launch Image Source. You can find these two options in Project build settings -> General

    Clean and build.

    Recommended solution step by step:

    1. Create splash image assets (name as LaunchImage) there in Image.assests folder.
    2. Select LaunchImage asset in Launch Image Source option.
    3. And Clear the text in Launch screen File option.
    4. Clean and build.
    5. Below is the reference image for right configuration:

    0 讨论(0)
  • 2020-11-30 01:45

    I finally figured it out!

    So, in your project settings, go to the section that says: App Icons and Launch Images

    Remove the information found in Launch Screen File if you do not want to use .xib file.

    Then, in Launch Image Source, Choose to migrate and if you have already created your LaunchImage file and added the images to it. Then click the asset catalog that shows up. The name of the one that contains your Launch Images.

    This will create a new Launch-Image2 in your image set. To use the one you already have created, click the drop-down menu next to Launch Image Source. And you should see your other Launch Image set. Choose it. Then re-build your application and run it. You should see your Launch Image. =)

    Hope this helps!

    Note: it won't delete your images that you already have in the asset catalog. It will just create a new LaunchImage asset set.

    Reference: https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/StoringAppIconsandLaunchImagesinanAssetCatalog.html

    0 讨论(0)
  • 2020-11-30 01:50

    This is too important !

    should be empty ! Launch Screen File

    0 讨论(0)
提交回复
热议问题