【发布时间】:2013-05-23 06:06:40
【问题描述】:
我使用 640x1136 图像作为我的应用程序的背景,但图像放大了。作为初始屏幕的相同图像可以正确显示。我按照here 的指示进行操作。 两张图,
原图:
截屏,模拟器 iPhone 6.1,和我的 iPhone 5 上的一样
我使用的代码如下:
CGRect screenSize = [[UIScreen mainScreen]bounds];
if (screenSize.size.height == 568.0f) {
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Default-568h@2x"]];
}else {
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Default@2x"]];
}
【问题讨论】:
标签: iphone xcode background resize