Last active
June 26, 2018 07:57
-
-
Save halilozel1903/c847bbea7b4121e9bb1c3a3bd7244be3 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
if usernameTxt.text == "" && passwordTxt.text == "" { | |
let alert = UIAlertController(title: "Alert", message: "Username and Password is empty", preferredStyle: .alert) | |
let okButton = UIAlertAction(title: "OK", style: .cancel, handler: nil) | |
alert.addAction(okButton) | |
self.present(alert, animated: true, completion: nil) | |
} | |
else if passwordTxt.text == ""{ | |
let alert = UIAlertController(title: "Alert", message: "Password is empty", preferredStyle: .alert) | |
let okButton = UIAlertAction(title: "OK", style: .cancel, handler: nil) | |
alert.addAction(okButton) | |
self.present(alert, animated: true, completion: nil) | |
} | |
else if usernameTxt.text == ""{ | |
let alert = UIAlertController(title: "Alert", message: "Username is empty", preferredStyle: .alert) | |
let okButton = UIAlertAction(title: "OK", style: .cancel, handler: nil) | |
alert.addAction(okButton) | |
self.present(alert, animated: true, completion: nil) | |
} | |
else if passwordTxt.text != passwordAgainTxt.text{ | |
let alert = UIAlertController(title: "Alert", message: "Passwords are not matching", preferredStyle: .alert) | |
let okButton = UIAlertAction(title: "OK", style: .cancel, handler: nil) | |
alert.addAction(okButton) | |
self.present(alert, animated: true, completion: nil) | |
} | |
else{ | |
let alert = UIAlertController(title: "Alert", message: "User Signed Up", preferredStyle: .alert) | |
let okButton = UIAlertAction(title: "OK", style: .cancel, handler: nil) | |
alert.addAction(okButton) | |
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