您的位置:首页 > 其它

imageView不能正确显示图片

2016-12-29 15:46 281 查看
- (void)viewDidLoad {

    [super viewDidLoad];

    UIImageView *image = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"welcome1"]];

    image.backgroundColor = [UIColor colorWithRed:0.127 green:0.917 blue:0.170 alpha:0.835];

    image.frame = CGRectMake(0, 0, 320,480);

    [self.view addSubview:image];

}

welcome1是图片的名称,png格式,模拟器效果如图


适配不是主要问题,问题是图片为什么不显示出来?求解答,感谢
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐