Launch Screen storyboard not displaying image

后端 未结 30 1512
忘了有多久
忘了有多久 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:24

    In my case, it was a bit more than just rebooting the device. My launch image was stored in other Assets (Other Pods).

    Had to move the image to App project's Assets. And then rebooted my device. (Check simulator first, it should work). Then it worked.

    Images can be in format png/pdf, single scale or not doesn't matter.

    0 讨论(0)
  • 2020-12-07 10:25

    After invested a lot of time, I got the solution:-

    Step 1:- Quit Xcode
    Step 2:- Delete the app from device/simulator
    Step 3:- Restart your device (if you are using simulator then you have to quit simulator)
    Step 4:- Clear all derived data 
    Step 5:- Clear Bin
    Step 6:- Open Xcode and relaunch the app, it will work 
    
    0 讨论(0)
  • 2020-12-07 10:26

    Follow below steps,

    1. Remove application from the device
    2. Restart device
    3. Build again

    If not working, delete derived data. Xcode Preference->Locationtab->Derived data. Then do follow above steps.

    0 讨论(0)
  • 2020-12-07 10:26

    I faced the same issue. Tried different solutions for that but nothing proved to be helpful. I then realised that the image was not visible only when i directly installed the app into device and the app is still connected to the xcode. If i disconnect it and then open the app the image was visible as expected. It might be a xcode bug.

    0 讨论(0)
  • 2020-12-07 10:26

    I tried cleaning the project, removing the png, removing the constraints did not work for me.

    I just made one more copy of the image and renamed the copy then deleted the old image and added the new image (Same, with name changed) i just gave that image and it worked for me.

    Also i am not using the Assets.xcassets, using the image in a folder.

    0 讨论(0)
  • 2020-12-07 10:27

    I was messing around with this for hours too. But i found the solution now. You need to add the image to your project and also to the assets.xcassets via drag and drop.

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