Reputation: 1320
I use a loop to load images into an NSMutableArray
. Each iteration loads an images using the imagedNamed
function in UIImage
: [UIImage imageNamed:*name*];
.
However, I wanted to change some of the images. So I removed the images from the project and added the new ones. But when I run the app in the iOS-simulator, the old images appear. Even when I remove all images from the project, they still appear.
Can someone explain why this is happening, and how I can change it?
Upvotes: 1
Views: 614
Reputation: 348
Clean your project CMD + SHIFT + K (XCODE 4.3 and above). sometimes reference of deleted items remains in the project and make sure that u reset your simulator also.
Upvotes: 2
Reputation: 3011
delete app from simulator, clean project and make sure that image exist. Image name is case sensitive. It may see on simulator but on device image will not display
Upvotes: 0
Reputation: 32066
The problem is that XCode hasn't recognised the new resources and usually the only way to fix it is to delete the old resources from the build folder.
Cmd + Opt + Shift + K cleans all targets and the build folder. This should fix it
Upvotes: 5
Reputation: 4879
Did you clean your project in XCode ? Sometimes when you change some resources like images, XCode doesn't copy the new ones one the simulator / device.
To do so, go to "Product" -> "Clean"
Upvotes: 1