<tutorialjinni.com/>

Swift Display Screen for Few Seconds

Posted Under: Programming, Snippets, Swift on Aug 28, 2018
Swift iOS snippet to show screen for specified seconds and then move to another screen.
override func viewDidAppear(_ animated: Bool) {
    super.viewDidAppear(animated)
    DispatchQueue.main.asyncAfter(deadline: .now() + 0.8){ // set Delay in seconds here
      // redirect to next view controller
    }
}
© Tutorial Jinni