使启动图像显示更长的xcode [英] Making the launch image display longer xcode
问题描述
我需要帮助才能在iphone上启动图像。
在xcode的项目设置中,有一个添加启动图像的选项。
我添加它并显示2秒...
我希望它更多...
如何更改它?
谢谢:)
I need help with launch images on iphone. In the project settings on xcode theres an option to add launch images. I added it and it displays for 2 seconds... I want it to be more... How can i change it? Thanks :)
推荐答案
您也可以通过在
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
[NSThread sleepForTimeInterval:2.0]; // Used For Showing Splash Screen for More Time
}
首先创建viewcontroller设置想要显示为启动画面/ Launc图像的图像..
First create the viewcontroller set the image what you want to show as splash screen/Launc image..
在方法applicationDidFinishLaunching中显示该视图:
,动画:否
Present that view in method applicationDidFinishLaunching: with Animated:No
并在您的另一个视图中写下以下代码:
and write following code in your another view that your presenting
-(void) viewWillAppear:(BOOL)animated
{
[self performSelector:@selector(dismiss1) withObject:nil afterDelay:5.0f];
[super viewWillAppear:animated];
}
-(void) dismiss1
{
[self dismissModalViewControllerAnimated:NO];
}
如果您想在每次应用打开时显示启动画面,然后在applicationDidBecomeActive方法中显示splashscreen视图控制器
If you want to show the splash screen every time app opens, then present the splashscreen viewcontroller in applicationDidBecomeActive method
这篇关于使启动图像显示更长的xcode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!