图片无法识别 ios
Image unrecognized ios
我有一个分配给 UIImageView 的 UIImage。
当我这样做时:
UIImage *picto = [UIImage imageNamed:@"animage.png"];
UIImageView *imageView1 = [[UIImageView alloc] initWithImage:picto];
它有效,但当我这样做时:
UIImage *picto = [UIImage imageNamed:@"animage2.png"];
UIImageView *imageView1 = [[UIImageView alloc] initWithImage:picto];
我的图片2没有显示,语法正确,我的图片存在于项目中...
顺便说一句,第二张图片没有显示只是因为它的名字
使用这种格式:
UIImageView *icon_bg=[[UIImageView alloc]init];
icon_bg.image=[UIImage imageNamed:@"animage.png"];
[Cell.contentView addSubview:icon_bg];
我有一个分配给 UIImageView 的 UIImage。
当我这样做时:
UIImage *picto = [UIImage imageNamed:@"animage.png"];
UIImageView *imageView1 = [[UIImageView alloc] initWithImage:picto];
它有效,但当我这样做时:
UIImage *picto = [UIImage imageNamed:@"animage2.png"];
UIImageView *imageView1 = [[UIImageView alloc] initWithImage:picto];
我的图片2没有显示,语法正确,我的图片存在于项目中...
顺便说一句,第二张图片没有显示只是因为它的名字
使用这种格式:
UIImageView *icon_bg=[[UIImageView alloc]init];
icon_bg.image=[UIImage imageNamed:@"animage.png"];
[Cell.contentView addSubview:icon_bg];