How to detect when Camera Control button pressed in iPhone 16

I want to detect when the Hardware Camer control button is pressed/interacted in the iPhone 16

Does Apple provide any API to detect the Hardware Camera control button in iPhone 16?

Hello,

You use AVCaptureEventInteraction to detect when the camera button is pressed: https://developer.apple.com/documentation/AVKit/AVCaptureEventInteraction

And this guide shows how to work with camera controls: https://developer.apple.com/documentation/avfoundation/capture_setup/enhancing_your_app_experience_with_the_camera_control

Hello @Sahabe, the sessionControlsDidBecomeActive(_:) delegate method from AVCaptureSessionControlsDelegate tells you when the Camera Control becomes active.

Hi, did you find out how to implement it?

the solutions above didn't work for me .

How to detect when Camera Control button pressed in iPhone 16
 
 
Q