How can I delay splash launch screen programatically in Swift 3 Xcode 8 -
i have put image
in imageview
in launchstoreyboard
. how can delay time of image programatically? highly appreciable.
here code launch screen view controller
import uikit class launshviewcontroller: uiviewcontroller { override func viewdidload() { super.viewdidload() self.delay(0.4) } func delay(_ delay:double, closure:@escaping ()->()) { let when = dispatchtime.now() + delay dispatchqueue.main.asyncafter(deadline: when, execute: closure) } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } }
put 1 line of code in appdelegate class
func application(_ application: uiapplication, didfinishlaunchingwithoptions launchoptions: [uiapplicationlaunchoptionskey: any]?) -> bool { thread.sleep(fortimeinterval: 3.0) // override point customization after application launch. return true }
Comments
Post a Comment