为有牺牲多壮志,敢教日月换新天。

[Swift]LaunchScreen.storyboard设置启动页!UILaunchImages已被iOS弃用,请使用LaunchScreen.storyboard。

★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

➤微信公众号:MindDraft
➤博主域名:https://www.zengqiang.org
➤GitHub地址:https://github.com/strengthen/LeetCode
➤原文地址: https://www.cnblogs.com/strengthen/p/10636993.html
➤如果链接不是山青咏芝的博客园地址,则可能是爬取作者的文章。
➤原文已修改更新!强烈建议点击原文地址阅读!支持作者!支持原创!
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

热烈欢迎,请直接点击!!!

进入博主App Store主页,下载使用各个作品!!!

注:博主将坚持每月上线一个新app!!!

设置【LaunchScreen.storyboard】,勾选【Use as Launch Screen】,

【LaunchScreen.storyboard】中添加两个imageView:背景图ImageView、图标ImageView。启动时即可显示启动图!

 注意以下几个地方:特别是Xcode版本

 


 在【AppDeleaget.swift】设置启动页的时长:

1 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
2         // Override point for customization after application launch.
3         //在顶部状态栏显示风火轮
4         UIApplication.shared.isNetworkActivityIndicatorVisible = true
5         //启动页显示时间3s
6         Thread.sleep(forTimeInterval: 3)
7         UIApplication.shared.isNetworkActivityIndicatorVisible = false
8         return true
9     }

点击查看:【LaunchScreen.storyboard如何跳转到到Main.storyboard】

注意选项:【Project Format】的设置

重要提示:如果Run后启动页不显示,把项目从模拟器或真机上删除,重新Run一次。

posted @ 2019-04-01 16:05  为敢技术  阅读(5220)  评论(0编辑  收藏  举报