How can I delay splash launch screen programatically in Swift 3 Xcode 8 -


i have put imagein 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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -