且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从用户的照片库中删除照片?

更新时间:2023-12-05 19:21:10

Apple实际上不允许您通过API从照片库中删除。用户必须实际转到照片应用并自行手动删除。 Apple确实允许您写入照片库:

Apple doesn't actually allow you to delete from the photo library through an API. The user has to actually go to the Photos app and delete it manually themselves. Apple does allow you write to the photo library:


要将静止图像保存到用户的
已保存照片相册,请使用
UIImageWriteToSavedPhotosAlbum
函数。要将电影保存到
用户保存的照片专辑,使用
UISaveVideoAtPathToSavedPhotosAlbum
功能。

To save a still image to the user’s Saved Photos album, use the UIImageWriteToSavedPhotosAlbum function. To save a movie to the user’s Saved Photos album, use the UISaveVideoAtPathToSavedPhotosAlbum function.

但是对于删除和编辑/覆盖现有照片,Apple现在没有类似的东西。

But for deleting and editing/overriding an existing photo, Apple doesn't have anything like that right now.