Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func checkFields() -> Bool {
- if((!loginPasswordTextField.text!.isEmpty) && (!loginPasswordTextField.text!.isEmpty)){
- return true
- } else {
- print("Empty Field was found")
- return false
- }
- }
- func displayMessage(errorMessage:String?, fromViewController:UIViewController){
- let titleMessage = "Error"
- let alert = UIAlertController(title: titleMessage, message: errorMessage, preferredStyle: .Alert)
- let actionOK = UIAlertAction(title: "Ok", style: .Default, handler: nil)
- alert.addAction(actionOK)
- fromViewController.presentViewController(alert, animated: true, completion: nil)
- }
- self.displayMessage(error.localizedDescription, fromViewController: self)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement