Created
May 25, 2017 13:53
-
-
Save JFSene/55824208c482edf169f11ff21564c5ec to your computer and use it in GitHub Desktop.
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
static func alertMessage(errorMessage: String, controller: UIViewController, title: String) { | |
let alertController = UIAlertController(title: title, message: errorMessage, preferredStyle: .alert) | |
let okAction = UIAlertAction(title: "Ok", style: .default, handler: nil) | |
alertController.addAction(okAction) | |
controller.present(alertController, animated: true, completion: nil) | |
} | |
static func alertMessageNav(errorMessage: String, controller: UIViewController, title: String, cHandler: @escaping (Void)-> () ) { | |
let alertController = UIAlertController(title: title, message: errorMessage, preferredStyle: .alert) | |
let okAction = UIAlertAction(title: "Ok", style: .default, handler: {(action:UIAlertAction) in | |
cHandler() | |
}) | |
alertController.addAction(okAction) | |
controller.present(alertController, animated: true, completion: nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment