Commit a5fc3e48 authored by yuzheng.tz's avatar yuzheng.tz

优化一些细节

parent 98bd8e0a
...@@ -626,10 +626,10 @@ static dispatch_once_t onceToken; ...@@ -626,10 +626,10 @@ static dispatch_once_t onceToken;
} }
- (void)savePhotoWithImage:(UIImage *)image location:(CLLocation *)location completion:(void (^)(NSError *error))completion { - (void)savePhotoWithImage:(UIImage *)image location:(CLLocation *)location completion:(void (^)(NSError *error))completion {
NSData *data = UIImageJPEGRepresentation(image, 0.9);
if (iOS8Later) { if (iOS8Later) {
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
if (iOS9Later) { if (iOS9Later) {
NSData *data = UIImageJPEGRepresentation(image, 0.9);
PHAssetResourceCreationOptions *options = [[PHAssetResourceCreationOptions alloc] init]; PHAssetResourceCreationOptions *options = [[PHAssetResourceCreationOptions alloc] init];
options.shouldMoveFile = YES; options.shouldMoveFile = YES;
PHAssetCreationRequest *request = [PHAssetCreationRequest creationRequestForAsset]; PHAssetCreationRequest *request = [PHAssetCreationRequest creationRequestForAsset];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment