I\'d like to display a temporary message on the iPhone/iPad displaying confirmation of an action, or some quick status about some background activity.
Is there a st
This is just a Swift 3 version of user2234810 2.2 version.
func showPopupWithTitle(title: String, message: String, interval: TimeInterval) {
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
present(alertController, animated: true, completion: nil)
self.perform(#selector(dismissAlertViewController), with: alertController, afterDelay: interval)
}
func dismissAlertViewController(alertController: UIAlertController) {
alertController.dismiss(animated: true, completion: nil)
}
showPopupWithTitle(title: "Title", message: "Message", interval: 0.5)