iPhone - Save UIImage to desktop on simulator
问题 I'm currently working on the simulator. I'd like to save an UIImage to a jpg file, on my desktop. It seems that I have a problems with paths or something. Thank you for your help :) 回答1: The following should get you started... myImage is an UIImage object. NSFileManager *fileManager = [NSFileManager defaultManager]; NSData *myImageData = UIImagePNGRepresentation(myImage); [fileManager createFileAtPath:@"/Users/Me/Desktop/myimage.png" contents:myImageData attributes:nil]; Edit: Just noticed