Launch Screen storyboard not displaying image

后端 未结 30 1650
忘了有多久
忘了有多久 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条回答
  •  抹茶落季
    2020-12-07 10:39

    I spent hours on this problem before finally realizing my mistake. When you add an image to a UIImageView, it will use just the name of the image. If your images are in a different folder than your storyboard, they will show up in xcode but not when running the app. You must add the appropriate file path prefix, for example, images/image.png. It will now appear as a blue question mark in xcode, but it will work in the app.

提交回复
热议问题