Skip to content

Latest commit

 

History

History
63 lines (52 loc) · 1.68 KB

protocol-dcecamerastatelistener-v2.3.20.md

File metadata and controls

63 lines (52 loc) · 1.68 KB
layout title description keywords needAutoGenerateSidebar noTitleIndex needGenerateH3Content breadcrumbText permalink
default-layout
iOS API References Protocol DCECameraStateListener - Dynamsoft Camera Enhancer
This is the documentation - iOS Protocol DCECameraStateListener page of Dynamsoft Camera Enhancer.
Camera Enhancer, iOS Protocol DCECameraStateListener
true
true
false
iOS Protocol DCECameraStateListener
/programming/ios/auxiliary-api/protocol-dcecamerastatelistener-v2.3.20.html

DCECameraStateListener

The interface to handle callback when camera state changes.

@protocol DCECameraStateListener <NSObject>
Method Type Description
stateChangeCallback required The callback method is triggered when camera state changes.

stateChangeCallback

The callback method is triggered when camera state changes.

- (void)stateChangeCallback:(EnumCameraState)cameraState;

Parameters

cameraState: The camera state. It includes opened, opening, closed and closing.

Code Snippet

>- Objective-C >- Swift > >1. ```objc @interface ViewController () - (void)configurationDCE{ [_dce setCameraStateListener:self]; } - (void)stateChangeCallback:(EnumCameraState)state{ // Add your code to do when camera state changes. } ``` 2. ```swift class ViewController: UIViewController,DCECameraStateListener{ func configurationDCE(){ dce.setCameraStateListener(self) } func stateChangeCallback(EnumCameraState currentState){ // Add your code to do when camera state changes. } } ```