Created
September 27, 2018 18:41
-
-
Save davut/213cfa27d25bbdce2786c18022170b5c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 showAlert(withTitle title: String, message: String, actionTitle: String) { | |
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) | |
let action = UIAlertAction(title: actionTitle, style: .default, handler: nil) | |
alertController.addAction(action) | |
present(alertController, animated: true, completion: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment