Reputation: 1513
When user takes a photo via devices camera, the photo appears with two button underneath itself - Retake & Use Photo. Is there any way to detect whether user has tapped the Use Photo button?
Upvotes: 0
Views: 396
Reputation: 488
You have to use the delegate UIImagePickerControllerDelegate take a look at the official documentation of apple
https://developer.apple.com/reference/uikit/uiimagepickercontrollerdelegate
Implement the
func imagePickerController(_ picker: UIImagePickerController,
didFinishPickingMediaWithInfo info: [String : Any])
in the ViewController which calls the UIImagePickerController and set the delegate to the calling ViewController.
Upvotes: 0
Reputation: 778
after user clicks "Use Photo" delegate method didfinishPickingMediawithInfo
is executed.
Upvotes: 1