Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 1.48 KB

protocol-torchlistener-v1.0.3.md

File metadata and controls

58 lines (47 loc) · 1.48 KB
layout title description keywords needAutoGenerateSidebar noTitleIndex needGenerateH3Content breadcrumbText permalink
default-layout
iOS Protocol CameraTorchListener - Dynamsoft Camera Enhancer
This is the documentation - iOS Protocol CameraTorchListener page of Dynamsoft Camera Enhancer.
Camera Enhancer, iOS Protocol CameraTorchListener
true
true
false
iOS Protocol CameraTorchListener
/programming/ios/auxiliary-api/protocol-torchlistener-v1.0.3.html

CameraTorchListener

The protocol that handles the torch state when the torch state changes.

@protocol CameraTorchListener <NSObject>
Method Type Description
didChangeTorchState required The method for user to add code when torch state is changed.

didChangeTorchState

The method for user to add code when torch state is changed.

- (void)didChangeTorchState:(TorchState)torchState NS_SWIFT_NAME(didChangeTorchState(torchState:));

Parameters

TorchState: The torch status.

Code Snippet

>- Objective-C >- Swift > >1. ```objc [_dce addTorchListener:self]; // Add protocol requirements - (void)didChangeTorchState:(TorchState) torchState{ // TODO add your code for torch listener } ``` 2. ```swift dce.addTorchListener(self) // Add protocol requirements func didChangeTorchState(torchState: TorchState){ // TODO add your code for torch listener } ```