Last active
October 27, 2018 14:06
-
-
Save marcos1262/059fd7ea4aacceda6d9327fa85bf983a to your computer and use it in GitHub Desktop.
Error alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIViewController { | |
func showError(_ message: String?) { | |
let alert = UIAlertController(title: "Error", message: message, preferredStyle: .alert) | |
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil)) | |
self.present(alert, animated: true, completion: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment