How to delete a photo from camera roll?

孤街浪徒 提交于 2019-12-10 21:38:17

问题


I can write photos to camera roll, but how can I delete one?

I remember a couple years ago someone said it is impossible, but I believe I have seen an app recently that did it.


回答1:


To delete photo from camera roll is not possible from application. Apple has never given access of delete photo of camera roll from application.




回答2:


This is now possible (since iOS 8). Hopefully this helps other folks who end up here from Google.

To do this, check out the deleteAssets method of the PHAssetChangeRequest class.

Docs here: https://developer.apple.com/library/ios/documentation/Photos/Reference/PHAssetChangeRequest_Class/#//apple_ref/occ/clm/PHAssetChangeRequest/deleteAssets:




回答3:


I could be wrong but I do not think you can delete photos that were not created or stored by your app. AT least I have not seen an Apple API to do that.




回答4:


You can try 百度魔拍 it really can delete photo from camera roll. (https://itunes.apple.com/cn/app/bai-du-mo-pai/id655426839?mt=8)



来源:https://stackoverflow.com/questions/16846344/how-to-delete-a-photo-from-camera-roll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!