-4
现在我正在使用Xcode 5创建应用程序。我的问题与启动图像有关。 我的问题是,当应用程序突然启动时会出现黑屏,然后启动屏幕(Aditional viewcontroller用于闪屏)平稳加载。 我已经设置了default.png(320 * 480)作为启动图像。在Xcode 4.5中,它工作的很完美。我不是为什么当应用程序启动时出现黑屏而不是default.png。我错过了什么?为Xcode 5启动图像
...高级谢谢...
这是我的代码使用spashviewController:
Appdelegate *appdelegate=(Appdelegate*)[[UIApplication sharedApplication] delegate];
int ht=[UIScreen mainScreen].bounds.size.height;
////NSLog(@"ht is %d",ht);
[self.view setFrame:CGRectMake(0, 71, 320,ht-64)];
if(appdelegate.window.frame.size.height==568)
{
// code for 4-inch screen
////NSLog(@"iPhone 5 Screen");
////NSLog(@"main view nd main image view is resizable so noo need to set frame,just change the the image of main image view");
backgroundimage.image=[UIImage imageNamed:@"[email protected]"];
activityIndicator.frame=CGRectMake(141,476,20,10);
} else {
backgroundimage.image=[UIImage imageNamed:@"default.png"];
}
请格式化您的代码。 – Popeye