Skip to content

Commit

Permalink
优化一些细节
Browse files Browse the repository at this point in the history
  • Loading branch information
banchichen committed Nov 14, 2017
1 parent 98bd8e0 commit a5fc3e4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,10 @@ - (void)savePhotoWithImage:(UIImage *)image completion:(void (^)(NSError *error)
}

- (void)savePhotoWithImage:(UIImage *)image location:(CLLocation *)location completion:(void (^)(NSError *error))completion {
NSData *data = UIImageJPEGRepresentation(image, 0.9);
if (iOS8Later) {
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
if (iOS9Later) {
NSData *data = UIImageJPEGRepresentation(image, 0.9);
PHAssetResourceCreationOptions *options = [[PHAssetResourceCreationOptions alloc] init];
options.shouldMoveFile = YES;
PHAssetCreationRequest *request = [PHAssetCreationRequest creationRequestForAsset];
Expand Down

0 comments on commit a5fc3e4

Please sign in to comment.