Launch Screen storyboard not displaying image

后端 未结 30 1674
忘了有多久
忘了有多久 2020-12-07 09:50

I\'m trying to get an image to display as the launch screen from my Launch Screen.storyboard file, however the image never displays. I have labels that show up fine, but the

30条回答
  •  萌比男神i
    2020-12-07 10:47

    After trying everything on several StackOverflow threads, here's what worked for me:

    • Use a .png
    • Do not include it in your Assets catalog. Add it to your project's hierarchy directly, as you would add any source file.
    • In the image view, load the image including its extension. Example: launch_app_image.png

    (Might have to clean product or derived data to update, but I didn't have to)

提交回复
热议问题