我正在使用640x1136图像作为我的应用程序的背景,但图像显示为放大。与启动画面相同的图像显示正确。我跟着发现的方向here。 两个图片,Xcode:在应用程序中调整背景图像
原始图像:
屏幕捕捉,仿真iPhone 6.1,并且看起来是在我的iPhone 5
的代码我一样我正在使用的是以下内容:
CGRect screenSize = [[UIScreen mainScreen]bounds];
if (screenSize.size.height == 568.0f) {
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"[email protected]"]];
}else {
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"[email protected]"]];
}
@ user2339310:好的,我从图像中剪下了49个像素,结果相同。 Nishant Tyagi:我在iPhone 5上运行应用程序,放大效果既在模拟器上,也在iPhone上。 – Luis