【发布时间】:2014-04-16 23:07:48
【问题描述】:
我正在 xcode 5 中开发一个通用应用程序,并尝试为这两个应用程序设置背景图像。我使用的代码在viewDidLoad 方法中:
UIImage *backgroundImage = [UIImage imageNamed:@"city5.jpg"];
UIImageView *backgroundImageView=[[UIImageView alloc]initWithFrame:self.view.frame];
backgroundImageView.image=backgroundImage;
[self.view insertSubview:backgroundImageView atIndex:0];
两个图像的名称是city5~iphone.jpg 和city5~ipad.jpg。
图像在 iphone 上按预期工作。但是 ipad 图像永远不会加载,视图只是保持空白。我正在 ipad 2 上部署。
【问题讨论】:
标签: ios iphone objective-c ipad