views:

467

answers:

3

I'm trying to do something really simple. I have an image for a button and I'm trying to set it on a custom button in interface builder. I set the background image accordingly (no case sensitivity problem here). In interface builder it shows up, but in the simulator or on the device it doesn't appear at all. Just the button's text will appear. Do I need to turn on some flag or something of the sort?

A: 

I have the same problem with an image as a background in my own UITableViewCell. Perfekt in Simulator but not showing up on my device.

Exactly the same is working in another app of mine (not with the same image and cell of course). I doublechecked all settings and code several times and can't find any difference.

I have no clue what's going on.

Gerd
A: 

Oooohhhh Noooo... too stupid. I hardly dare to tell you...

[UIImage imageNamed:@"Image.png"] is not case sensitive on simulator, but case sensitive on the device.

I have had "Image.png" in my code, but the name of the image was "image.png" in the bundle.

Renamed->worked.

It's a pity. A few hours for nothing....

Gerd
+1  A: 

I found the problem. It wasn't being linked with the Target's Copy Bundle Resources. I don't think I ever had to do this for other resources.

Shouldn't this be done automatically when you add it to the Resources of the project?

xenonii