【问题标题】:How can I retrieve the metadata of PHAsset?如何检索 PHAsset 的元数据?
【发布时间】:2017-11-03 15:43:35
【问题描述】:

我正在以PHAsset 格式获取用户选择的图像。我想获取图片路径。

我的目标是将图片上传到 Firebase 并基于他们的docs,我需要有图片路径。

我通过研究发现我需要先获取图像的元数据并将其存储在本地文件中,然后才能检索 URL。对吗?

我的问题是(如果以上正确),我怎样才能得到PHAsset图像格式的元数据?

【问题讨论】:

标签: ios swift phasset


【解决方案1】:

如果您想从您的 PHAsset 地址检索图像文件路径,请使用此功能:

[asset requestContentEditingInputWithOptions:[PHContentEditingInputRequestOptions new] completionHandler:^(PHContentEditingInput *contentEditingInput, NSDictionary *info) {
        NSURL *imageURL = contentEditingInput.fullSizeImageURL;
        }];

资产=PHAsset *资产

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-26
    • 2015-10-18
    相关资源
    最近更新 更多