Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func connection(connection:NSURLConnection!, willSendRequestForAuthenticationChallenge challenge:NSURLAuthenticationChallenge!) {
- if challenge.previousFailureCount > 1 {
- } else {
- let creds = NSURLCredential(user: usernameTextField.text, password: passwordTextField.text, persistence: NSURLCredentialPersistence.None)
- challenge.sender.useCredential(creds, forAuthenticationChallenge: challenge)
- }
- }
Add Comment
Please, Sign In to add comment