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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -