UIImageView missing images in Launch Screen on device

后端 未结 30 1845
遇见更好的自我
遇见更好的自我 2020-11-30 16:39

I have an app that supports iOS8 and later, built in Xcode 7 and I am using a XIB for a Launch Screen (I do not have launch images). The view contains a single UILabel with

相关标签:
30条回答
  • 2020-11-30 17:20

    I also had this exact problem in Xcode 7 with iPad and iPhone devices. Although it makes no sense, I was able to get around it most of the time by setting not only the Image but also the Highlighted image in the image view to the same image in my images.xcassets.

    0 讨论(0)
  • 2020-11-30 17:20

    SOLVED!

    The only thing that worked for me was deleting the ViewController from LaunchScreen.storyboard and create a new ViewController set to

    Is Initial View Controller

    Simple as that :)

    0 讨论(0)
  • 2020-11-30 17:21

    This is too important Must be empty! Launch Screen File

    0 讨论(0)
  • 2020-11-30 17:22

    "The solution for me was simply to make sure that the "Clears Graphics Context" box is unchecked for the UIImageView in the storyboard. Just changing this fixed it for me." No other solutions worked for me. Got it from apple developer forum

    0 讨论(0)
  • 2020-11-30 17:22

    Next helped to me:

    • change "Launch Screen File" to another xib
    • run the app
    • change xib back

    Also very important: check that your is xib not opened in another tab, that can cause it as well!

    0 讨论(0)
  • 2020-11-30 17:24

    Turn if off and then on again.

    Seriously, restart the device — that’s what fixed it for me.

    Here’s what didn’t work:

    • Cleaning DerivedData
    • Cleaning the project
    • Uninstalling the app from the device
    • Restarting Xcode
    • Restarting the computer

    Older observations:

    Just like the others, it:

    • Works fine in the Simulator
    • Used to work on the devices (iPhone 5S, iPad Air)
    • No code changes (verified via git reset --hard HEAD), yet stopped working.

    What I remember triggering the first build where it stopped working was unplugging the iPhone while it was runnning. (Not sure if it’s related.)

    However, the git reset not fixing it (combined with all the clean steps not working) tells me it this must be getting cached somewhere else. Quite possibly in one of the .gitignored files? (I’m using Git ignore file for Xcode projects)

    One workaround that worked for one UIImageView (in the UIView that has three) but not for the others was putting the image into an .xcassets file. Reverting to the plain image file did not undo the fix. (Really feels like a caching error.)

    UPDATE: See top — restarting the device is what fixed it. I get the feeling the wrong bitmap data is being cached on the device itself.

    Radar: http://openradar.appspot.com/23534818

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