【发布时间】:2012-01-12 23:59:36
【问题描述】:
我在 info.plist 中的应用程序中添加了启动图像。那么,请问是否可以将启动应用程序的时间设置为 5 秒。谢谢
【问题讨论】:
标签: iphone objective-c xcode
我在 info.plist 中的应用程序中添加了启动图像。那么,请问是否可以将启动应用程序的时间设置为 5 秒。谢谢
【问题讨论】:
标签: iphone objective-c xcode
是的。您可以设置启动图像的时间。下面是代码。可能对你有帮助。
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(onLaunchExpire) userInfo:nil repeats:NO];
使用这个,让我知道更多细节..
【讨论】:
在您的 App 委托类中,在 didFinishLaunchingWithOptions 方法中。
[NSThread sleepForTimeInterval:5.0];
这将使您的应用等待 5 秒。
【讨论】:
didFinishLaunchingWithOptions,我编辑的。
你绝对可以这样做,但你不应该这样做。用户将毫无用处地盯着一个无用的启动画面。
【讨论】:
在您的应用委托的 didFinishLaunching 方法中,执行以下操作:
sleep(5);
【讨论】: