views:

52

answers:

2

I have an image that changes due to a button press. I have the code set up like this:

UIImage *example = [UIImage imageNamed: @"Example.png"];
UIImage *stuff = [UIImage imageNamed: @"Stuff.png"];
UIImage *bob = [UIImage imageNamed: @"Bob.png"];
UIImage *thing = [UIImage imageNamed: @"thing.png"];

It used to be so that the last image was Thing.png and not thing.png. This was because thing would load on iphone simulator but not the device. I saw a question on here that said it may be because the iphone filing system is case sensitive, so I changed it to lowercase. It then worked. What I don't understand is that in the resources folder it is called Thing.png, not thing.png, and it is like that in finder as well. So why did it need to be changed, especially if all the other images loaded just fine?

A: 

Did you try cleaning the solution and then changing the name back?

Richard J. Ross III
Is that the clean option under build/clean?
Regan
yes it is....try the clean all targets options, if you have multiple targets
Richard J. Ross III
You could also try completely removing the build directory. I have often had issues with files that were not removed by cleaning alone.
Jon Steinmetz
hmmm cleaning didn't work
Regan
its not really that big of a deal though, just wondering why it happened
Regan
FYI, there's no such thing as a 'solution' in Xcode. :-)
kubi
A: 

When something like that happens I usually remove the app from the phone, clean all targets, Empty XCode cache and delete the build folder.

In this case it would also be worth deleting the file from the project in Finder, then deleting it from XCode (it should appear red) and finally re-add it.

rhodesy22