Swift 4 imagepickerview错误

时间:2017-11-07 20:25:24

标签: xcode swift4

发现扩展时遇到的错误:错误域= PlugInKit代码= 13"查询已取消" UserInfo = {NSLocalizedDescription = query canceled}

2 个答案:

答案 0 :(得分:0)

您需要获得访问图书馆的权限

YourPhotoLibrary.requestAuthorization({ (status: YPLAuthorizationStatus) -> Void in()
        if YourPhotoLibrary.authorizationStatus() == YPLAuthorizationStatus.authorized {
            // Implement your UIImagepicker method here
        }
    })

答案 1 :(得分:0)

enter image description here

这是图像选择器的代码