OGeek|极客世界-中国程序员成长平台

标题: ios - 如何手动请求 NSPhotoLibraryAddUsageDescription? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 14:13
标题: ios - 如何手动请求 NSPhotoLibraryAddUsageDescription?

在IOS中有一个权限NSPhotoLibraryAddUsageDescription 我想在我的应用程序第一次启动时要求它。
所以我只想检查是否允许并要求它。

我可以做些什么来强制进行此权限检查?



Best Answer-推荐答案


您可以使用 PHPhotoLibrary.requestAuthorization(_ 请求并使用 PHPhotoLibrary.authorizationStatus

检查状态

见:Apple docummentation for requestAuthorization

关于ios - 如何手动请求 NSPhotoLibraryAddUsageDescription?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47698826/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4