解决方法
这应该工作:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString *docs = [paths objectAtIndex:0]; NSString* path = [docs stringByAppendingFormat:@"/image1.jpg"]; NSData* imageData = [NSData dataWithData:UIImageJPEGRepresentation(imageView.image,.8)]; NSError *writeError = nil; if(![imageData writeToFile:path options:NSDataWritingAtomic error:&writeError]) { NSLog(@"%@: Error saving image: %@",[self class],[writeError localizedDescription]); }