How can I delay splash launch screen programmatically in Swift Xcode iOS

后端 未结 6 1909
后悔当初
后悔当初 2021-01-31 19:01

I have put an image in imageView in LaunchStoreyboard. How can I delay the time of image programmatically?

Here is the Lau

6条回答
  •  自闭症患者
    2021-01-31 19:59

    Put one line of code in AppDelegate class -

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
            Thread.sleep(forTimeInterval: 3.0)
            // Override point for customization after application launch.
            return true
        }
    

提交回复
热议问题