【问题标题】:How to get image url from PHAsset for iOS 13如何从 PHAsset for iOS 13 获取图像 url
【发布时间】:2019-10-11 11:14:13
【问题描述】:

由于不再给出PHImageFileURLKey,我如何获取所选图片的图片参考网址!

使用PHImageFileUTIKey 键我能够获取文件名。

我尝试在PHAssetResource.assetResources(for: assets[0]) 周围玩,但仍然没有运气!

【问题讨论】:

    标签: swift4 ios13 xcode11 phasset


    【解决方案1】:
    asset.requestContentEditingInput(with: nil, completionHandler: { (input, info) in
        if let input = input {
            print(input.fullSizeImageURL) // file:///xxx    
        }
    })
    

    这就是我获得完整 imageURL 的方式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-24
      • 1970-01-01
      • 2016-11-06
      相关资源
      最近更新 更多