该应用程序具有通用性,并且在除iPod之外的所有其他设备上均可正常运行。我用了两个分镜脚本。
这是我在AppDelegate
中编写的代码。
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIImage* background = [UIImage imageNamed:@"navigation-bar-background"];
[[UINavigationBar appearance] setBackgroundImage:background forBarMetrics:UIBarMetricsDefault];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:[[UIImage imageNamed:@"black-back-button"]resizableImageWithCapInsets:UIEdgeInsetsMake(0, 10, 0, 10)] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:[[UIImage imageNamed:@"black-back-button-landscape"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 10, 0, 10)] forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone];
[[UISlider appearance] setThumbImage:[UIImage imageNamed:@"knob-button"] forState:UIControlStateNormal];
return YES;
}
最佳答案
只需更改图像(确保新的试用图像为png格式),然后查看它是否显示。
关于iphone - 应用程序在ipod上显示黑屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14314301/