Image on UIButton is invisible on the device
*NOTE I do not have this problem while running my app through the simulator.
I have an image on a UIButton which works fine. However upon selecting another button... the image of the first button is supposed to change. It works in the ios 4 simulator just fine. However when I load it Via Ad Hoc onto my iPhone,开发者_运维技巧 when the image is supposed to change, it just turns blank.
Here is my code for the image change...
UIImage *upDinoUp = [UIImage imageNamed:@"upDinoUp.png"];
[Dino setImage:upDinoUp forState:UIControlStateNormal];
I think the simulator differs from the device in that its handling of image names is case insensitive. So, maybe your string @"upDinoUp.png" has the wrong case for one of the characters.
Sometimes the image format may not be supported by the device. Please check it
精彩评论