- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
/*this will pause main thread for x interval seconds.
put on the top of application:didFinishLaunchingWithOptions, so it will not
proceed to show window until sleep interval is finished.*/
[NSThread sleepForTimeInterval:5]; //add 5 seconds longer.
//other code....
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
/*this will pause main thread for x interval seconds.
put on the top of application:didFinishLaunchingWithOptions, so it will not
proceed to show window until sleep interval is finished.*/
[NSThread sleepForTimeInterval:5]; //add 5 seconds longer.
//other code....
}
Probably the splash screen you are talking about is "default.png" file. As JustSid mentioned, this file is not intended to be splash screen, rather to be used as a first screen snapshot to improve user experience concerning application loading time. Check human interface guideline
发布评论
评论(4)
在
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
方法中写入sleep(5.0)
。
Write
sleep(5.0)
in your- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
method.您需要创建一个视图控制器来显示启动屏幕,如下所示。
You need to create a view controller for displaying the splash screen as done below.
您所说的启动画面可能是“default.png”文件。正如 JustSid 提到的,该文件并不是要用作启动屏幕,而是用作第一个屏幕快照,以改善有关应用程序加载时间的用户体验。检查人机界面指南
http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW5
如果你想实现闪屏,你应该使用 ie。 NSTimer 和 UIView 组件。
Probably the splash screen you are talking about is "default.png" file. As JustSid mentioned, this file is not intended to be splash screen, rather to be used as a first screen snapshot to improve user experience concerning application loading time. Check human interface guideline
http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW5
If you want to implement splashscreen, you should use ie. NSTimer and UIView components.