2013-05-28 41 views
0

我正在使用640x1136图像作为我的应用程序的背景,但图像显示为放大。与启动画面相同的图像显示正确。我跟着发现的方向here。 两个图片,Xcode:在应用程序中调整背景图像

原始图像:

640x1136 image

屏幕捕捉,仿真iPhone 6.1,并且看起来是在我的iPhone 5

screen capture

的代码我一样我正在使用的是以下内容:

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]"]]; 
} 

回答

0

您的应用程序底部有tabbar。因此,您需要为Inicio选项卡的Splash屏幕和背景屏幕使用不同的图像。

0

您正在使用ratina图像(后缀为@ 2x)并检查NonRetina模拟器。所以选择使用iPhone模拟器属性的视网膜模拟器为

Hardware -> Device -> iPhone(Retina 4-inch) 

然后运行应用程序。

希望它可以帮助你。

+0

@ user2339310:好的,我从图像中剪下了49个像素,结果相同。 Nishant Tyagi:我在iPhone 5上运行应用程序,放大效果既在模拟器上,也在iPhone上。 – Luis