美文网首页iOS菜鸟食谱JC专题
让iOS App启动页停留指定的时间

让iOS App启动页停留指定的时间

作者: ldjhust | 来源:发表于2015-10-11 17:13 被阅读3453次

在开发一款商业App时,我们大都会为我们的App设置一个启动页,苹果默认启动页停留的时间很短,有时不满足我们的需求,这时我们就可以手动控制启动页停留的时间,没有太高深的代码,只需在didFinishedLanuchWithOptions(AppDelegate.m里面)代理方法里面让线程休眠指定的时间即可。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

  [NSThread sleepForTimeInterval:5]; // 设置启动页面停留时间

  return YES;

}

相关文章

网友评论

    本文标题:让iOS App启动页停留指定的时间

    本文链接:https://www.haomeiwen.com/subject/nnxocttx.html