快速选择iOS 14的有限选项时如何从照片库中获取选定的图像

问题描述

用户从照片库中选择有限选项时如何获取选定的图像,如下面的授权代码所示

PHPhotoLibrary.requestAuthorization { (status) in
switch status
{
case .Authorized:
    print("Good to proceed")
    let fetchOptions = PHFetchOptions()
    let allPhotos = PHAsset.fetchAssetsWithMediaType(.Image,options: fetchOptions)
    print("Found \(allPhotos.count) images")
case .Denied,.Restricted:
    print("Not allowed")
case .NotDetermined:
    print("Not determined yet")
}

}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)