i have to fix the follow code for swift2.
if !UIImagePNGRepresentation(img).writeToFile(imagePath, options: nil, error: &error) {
if let actualError = error {
NSLog("Image not saved. \(actualError)")
}
}
To compile it i have this error on if row: Cannot invoke writeToFile
with an argument list of type (String, options: _, error: inout NSError?)
How I can fix it.