Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIImagePickerController detecting when photo goes into edit mode

I've added a custom button to UIImagePicker like below:

enter image description here

It is just an UIButton set as the overlay view. However when the camera goes into the edit mode the button is in the way:

enter image description here

Is there anyway to detect the shutter button has been pressed? That way I could just hide the button. I know I can use func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject])

however this is AFTER "Use Photo" has been tapped. I need to detect before the edit view comes in. Any pointers on this would be great.

like image 935
KexAri Avatar asked Dec 15 '25 19:12

KexAri


1 Answers

With default UIImagePickerView, its not possible.

You don't get notified when the user taps the button but you can provide your own capture button

Hide its standard image picker controls (showsCameraControls) and provide a custom overlay view (cameraOverlayView). In that overlay view, place a custom button that you connect to a target/action.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!