Reputation: 3545
I have an UIImage that I assign to an UIImageView.
When I do :
UIImage *picto = [UIImage imageNamed:@"animage.png"];
UIImageView *imageView1 = [[UIImageView alloc] initWithImage:picto];
it works, but when I do :
UIImage *picto = [UIImage imageNamed:@"animage2.png"];
UIImageView *imageView1 = [[UIImageView alloc] initWithImage:picto];
My image 2 isn't displayed, the grammar is correct and my image exist in the project...
By the way, the second image is not displayed just because it name
Upvotes: 0
Views: 23
Reputation: 4171
use this format :
UIImageView *icon_bg=[[UIImageView alloc]init];
icon_bg.image=[UIImage imageNamed:@"animage.png"];
[Cell.contentView addSubview:icon_bg];
Upvotes: 1