fromdw
fromdw

Reputation: 21

iPad App missing icon

I created an imageview programmatically and filled a png file in it. When I run app in simulator or debug it on the Ipad, everything is fine. I archived app and distributed as a Ad-Hoc deployment ipa. I install ipa file to a iPad, the imageview is disappeared. Who can help me for it? the png file is no problem because use it as background picture no problem.

The source code like below

UIImageView *uiImageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 20, 20)];
UIImage *image = [UIImage imageNamed:@"first.png"];
uiImageView.image = image;

also did this way

UIImage *img = [UIImage imageNamed:@"first.png"];    
UIImageView * uiImageView = [[UIImageView alloc] initWithImage:img];
uiImageView.bounds = CGRectMake(20, 20, 20, 20);
CGRect frameimage = uiImageView.frame;
frameimage.origin.x = ..;
frameimage.origin.y = ..;
uiImageView.frame = frameimage;

Upvotes: 0

Views: 149

Answers (1)

occulus
occulus

Reputation: 17014

Carefully check the case of your image filename. Often you'll find that the simulator is not case sensitive with respect to file names (depending on how your Mac OS X disk is formatted), whereas the simulator is case sensitive.

So, for example, if you have an image named Cat.png and you try and load it using the resource name cat.png, it may work in the simulator, but not on an actual device.

This may not be your exact problem, but is worth checking.

Upvotes: 1

Related Questions