图片存储
NSData *imageData;
if (UIImagePNGRepresentation(imageToSave) == nil) {
imageData = UIImageJPEGRepresentation(imageToSave, 1);
} else {
imageData = UIImagePNGRepresentation(imageToSave);
}
NSString *documentPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
NSString *filePath = [documentPath stringByAppendingPathComponent:@"a.png"];
[imageData writeToFile:filePath atomically:YES];