是否可以在没有警告视图的情况下从 iPhone 中删除照片?

Is it possible to delete a Photo from the iPhone without alert view?

我用这个方法:

PHPhotoLibrary.sharedPhotoLibrary().performChangesAndWait({
                    PHAssetChangeRequest.deleteAssets(assets)
                    self.dismissViewControllerAnimated(true, completion: nil)

                })

该方法的作用是将资产中包含的照片放入垃圾箱。 但每次我这样做时,一个警告视图显示 "Allow "application" to delete x photos?"出现

是否有禁用此警报视图的解决方案? 或者用在其他时刻出现的个人警报视图替换此警报视图?

实际上没有,因为出于安全原因,这是 ios 框架的默认行为。 如果你愿意,你可以浏览框架并看到他调用 alert