2013-05-28 51 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