开发者

Images not being displayed on iOS 3.2

开发者 https://www.devze.com 2023-03-11 20:55 出处:网络
I have a small iPhone app which works fine on iOS 4, but when i run it on iOS 3.2 or below none of the app images are displayed. At first, i thought it was because i was missing some high res images b

I have a small iPhone app which works fine on iOS 4, but when i run it on iOS 3.2 or below none of the app images are displayed. At first, i thought it was because i was missing some high res images but if that was the case then the images still would have been displayed on iOS 3.2?

So, my question is: Why are my images being displayed fine on iOS4 but not at all on iOS 3.2 and below?

EDIT: This is how im loading the images atm (its in a UITableView):

UIImage *cellImage = [UIImage imageNamed:imageName];
UIImage *chevronImage = [UIImage imageNamed:@"chevron"];
UIImageView *chevronImageView = [[UIImageView alloc] initWithImage:chevronImage];

[[cell imageView] setImage:cellImage];
[[cell textLabel] setText: [names objectAtIndex:indexPath.row]];
[cell setAcce开发者_如何学运维ssoryView:chevronImageView];

Thanks


It could be a problem related to the filename extension in your call:

UIImage *chevronImage = [UIImage imageNamed:@"chevron"];

You could try to change this to:

UIImage *chevronImage = [UIImage imageNamed:@"chevron.png"];

I suspect that iOS 4+ "automagically" infers the images extension when you do not use them.

0

精彩评论

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