swift 设置启动页
Assets.xcassets 文件下右键选择ios ->ios Launch Image;
将对应的启动图片文件拉到对应的框里;
选中你的项目,点击General 把Launch Screen File里的内容删掉,如果没有Launch Images Source 是你的项目的启动图片 ,如果没有该选项, 则
在工程 targets–Build Settings 搜索 Asset Catalog Launch Image Set Name 然后设置创建的启动页名字即可如下图所示。名字和启动图的名字一样。
设置启动页停留时间
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Thread.sleep(forTimeInterval: 2) // pause 2 sec before main storybord shows
return true
}