Browsed by
Tag: delay time

IOS Swift 3/4 show alert for specific time duration

IOS Swift 3/4 show alert for specific time duration

   let alert = UIAlertController(title: “”, message: “alert disappears after 30 seconds”, preferredStyle: .alert)             self.present(alert, animated: true, completion: nil)             // change to desired number of seconds (in this case3 0 seconds)             let when = DispatchTime.now() + 30             DispatchQueue.main.asyncAfter(deadline: when){                 // your code with delay          …

Read More Read More