I\'ve been learning swift rather quickly, and I\'m trying to develop an OS X application that downloads images.
I\'ve been able to parse the JSON I\'m looking for into a
The following code would write a UIImage in the Application Documents directory under the filename 'filename.jpg'
var image = .... // However you create/get a UIImage
let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String
let destinationPath = documentsPath.stringByAppendingPathComponent("filename.jpg")
UIImageJPEGRepresentation(image,1.0).writeToFile(destinationPath, atomically: true)