Created
September 7, 2015 04:45
-
-
Save zsim0n/592eba07f52b5116076b to your computer and use it in GitHub Desktop.
Convert text to Base64 - Swift
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 textFieldShouldReturn(textField: UITextField) -> Bool { | |
urlField.resignFirstResponder() | |
let data = urlField.text!.dataUsingEncoding(NSUTF8StringEncoding) | |
let urlFieldBase64 = data?.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.Encoding64CharacterLineLength) | |
return false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment