gpt4 book ai didi

ios - 将 uiimage 保存到 ios 扩展中的照片库

转载 作者:行者123 更新时间:2023-11-29 02:22:15 26 4
gpt4 key购买 nike

ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library writeImageToSavedPhotosAlbum:[image CGImage] orientation:(ALAssetOrientation)[image imageOrientation] completionBlock:^(NSURL *assetURL, NSError *error){
if (error) {
// TODO: error handling
} else {
// TODO: success handling
}
}];

我使用上面的代码将uiimage保存到我的自定义键盘扩展中的照片库中。但我遇到了访问被拒绝的错误。我尝试允许此扩展程序访问照片库,但在设置->隐私->照片中看不到此扩展程序。请帮我!谢谢。

最佳答案

请阅读Understanding privacy and Location Services on iPhone, iPad, and iPod touch with iOS 8 document .

苹果说,

You can turn Location Services on or off at Settings > Privacy > Location Services. You can turn Location Services on either during the Setup Assistant process or later through the Location Services setting. You can individually control which apps and system services have access to Location Services data. When Location Services are off, apps can't use your location in the foreground or background. This will limit the performance of various Apple and third-party apps.

关于ios - 将 uiimage 保存到 ios 扩展中的照片库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28008295/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com