Search code examples
iosiphoneswiftphotosframeworkphasset

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


I use this method :

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

                })

The effect of this method is to put to trash the Photos which are contained in assets. But every time I do that, An alert view which says "Allow "application" to delete x photos ?" appears

Is there a solution to disable this alert view ? Or to replace this alert view by a personal alert view which appears at an other moment ?


Solution

  • Actually no because this is a default behavior from ios framework for security reason. If you want you can navigate through framework and see that he call alert