iOS模拟器中的iPad背景图像

时间:2015-08-27 20:13:11

标签: ios ipad background

因此,出于某种原因,每当我在xcode中运行ipad模拟器时,它都无法识别它是作为ipad运行并在ipad上为iphone拉出背景图像。这使它看起来非常紧张和扭曲。

以下是我的ISUtilsPack.h代码的一部分:

//device type definition
#ifdef UI_USER_INTERFACE_IDIOM
#define IS_IPAD             (UI_USER_INTERFACE_IDIOM() ==   UIUserInterfaceIdiomPad)
#define IS_IPHONE           (UI_USER_INTERFACE_IDIOM() ==  UIUserInterfaceIdiomPhone)
#else
#define IS_IPAD false
#define IS_IPHONE true
#endif

这是我的UIManager.m的代码:

//background image
+ (UIImage *)mainBackgorundImage 
{
UIImage *image = [UIImage imageNamed:@"iphone-568"];
if(IS_IPAD)
    image = [UIImage imageNamed:@"ipad"];
return image;
}

每次xcode都在为背景而不是ipad图像拉动iphone-568图像,即使在运行ipad的模拟器时也是如此。有谁知道这是为什么?

谢谢!

0 个答案:

没有答案