从PHAsset获取文件名有两种方式
1.asset.value(forKey: "filename")
2.由PHImageManager获取
PHImageManager.default().requestImageData(for: data, options: option, resultHandler: { (imageData, uti, orientation, infos)in
varfileName =""
ifleturl = infos?["PHImageFileURLKey"]as?URL{
fileName = url.lastPathComponent
}
})
网友评论