美文网首页iOS 开发
iOS 相册图片地址

iOS 相册图片地址

作者: daobao777 | 来源:发表于2020-04-12 17:03 被阅读0次

    获取相册照片位置信息

    PHContentEditingInputRequestOptions *options = [[PHContentEditingInputRequestOptions alloc] init];
        [options setCanHandleAdjustmentData:^BOOL(PHAdjustmentData * _Nonnull adjustmentData) {
            return YES;
        }];
    for (int i = 0; i<photos.count; i++) {
        PHAsset *asset = assets[i];
        UIImage *img = photos[i];
        [asset requestContentEditingInputWithOptions:options completionHandler:^(PHContentEditingInput * _Nullable contentEditingInput, NSDictionary * _Nonnull info) {
            NSLog(@"图片地址----%@", contentEditingInput.fullSizeImageURL.path);
        }];
    }
    

    原文地址 https://stackoverflow.com/questions/38183613/how-to-get-url-for-a-phasset?noredirect=1#

    相关文章

      网友评论

        本文标题:iOS 相册图片地址

        本文链接:https://www.haomeiwen.com/subject/emlbmhtx.html