Hackmodford
Hackmodford

Reputation: 3970

Image does not update in Launch Storyboard

I have noticed that if I change an image in the xcassets, the launch storyboard does not update.

For instance, let's say you have a UIImage view in your launch storyboard with an image called "logo" that is blue. If you open up the in the Finder and change the color of the image to red, next time you run on the device the logo will still be blue.

The preview of the storyboard in xCode will show the correct (red) logo image.

Before running, I have tried:

Nothing seems to fix the problem. Is there another option that I am missing?

Upvotes: 5

Views: 1255

Answers (3)

Alexis Candelaria
Alexis Candelaria

Reputation: 257

I tried deleting the app from device while also deleting the derived data and cleaning, but it seems that you have to restart the device. That is the only thing that worked for me.

Upvotes: 0

Thomas
Thomas

Reputation: 515

Appears to be a problem with caching on the device. Delete your app, restart the device, and pray. Image does not update when changed if that image is used on LaunchScreen.storyboard

Upvotes: 4

EQOxx123
EQOxx123

Reputation: 244

Exiting out should normally solve the job... Sometimes, especially in the playground I have heard and experienced, it will not automatically refresh and you can either:

  1. Wait a tiny bit(in most cases) but it seems you would not be asking if it were a few seconds of delay so maybe try

  2. Deleting everything associated with that image(the outlet reference, image on storyboard, and any time you use that image in you code(leave those spaces blank)), then create a new UIImageView and assign it to your desired image.

  3. In your Images.xcassetts file you may have only changed the info on one of the sizes; make sure those are all set.

Then again, especially after the most recent WWDC, there have been some bugs in Xcode that will need to be patched in the future. At the least, I hope this helps you and people who view this in the future.

Upvotes: 0

Related Questions