imageView不能正确显示图片

来源:互联网 发布:本泽马 fifa16数据 编辑:程序博客网 时间:2024/04/20 14:34
- (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格式,模拟器效果如图


适配不是主要问题,问题是图片为什么不显示出来?求解答,感谢
0 0