Created
December 3, 2017 12:06
-
-
Save azamsharp/622c56d2c3ce2e4d73785e16d923881e to your computer and use it in GitHub Desktop.
button click
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
@IBAction func saveButtonClicked() { | |
let user = User(username: self.usernameTextField.text!, password: self.passwordTextField.text!) | |
let isSaved = self.dataAccess.saveUser(user) | |
if isSaved { | |
performSegue(withIdentifier: "LoginTableViewController", sender: self) | |
} else { | |
self.messageLabel.text = "User name is already taken" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment