objective-ciosios-simulatorimagenamed

Objective C: imageNamed loading non existing image


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?


Solution

  • 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