Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var url:URL = URL(string:""+textField.text!+"/profile_image?size=bigger")!
var err: NSError?;
var imageData :NSData = try! NSData(contentsOf: url, options: NSData.ReadingOptions.mappedIfSafe);
var img = UIImage(data:imageData as Data);
var IconImagePath: String {
let doc = NSSearchPathForDirectoriesInDomains( .documentDirectory, .userDomainMask, true )[0] as String
return ( doc as NSString ).appendingPathComponent("icon_send.jpg" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment