- (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格式,模拟器效果如图
适配不是主要问题,问题是图片为什么不显示出来?求解答,感谢
[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格式,模拟器效果如图

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