Created
May 4, 2017 12:24
-
-
Save JayachandraA/7c31eb886fb0962cf42e748f5e05fe6b 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
func performLogin(alertController: UIAlertController) { | |
guard let textFields = alertController.textFields else { return } | |
var params = [String:String]() | |
for textField in textFields{ | |
if textField.placeholder == "Enter username"{ | |
params["username"] = textField.text | |
} | |
if textField.placeholder == "Enter password"{ | |
params["password"] = textField.text | |
} | |
} | |
print("login params \(params)") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment