开发者

Image on UIButton is invisible on the device

开发者 https://www.devze.com 2023-02-01 10:36 出处:网络
*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 s

*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

0

精彩评论

暂无评论...
验证码 换一张
取 消