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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -