Resource Base
Table of contents

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. [_dce addTorchListener:self];
    // Add protocol requirements
    - (void)didChangeTorchState:(TorchState) torchState{
       // TODO add your code for torch listener
    }
    
  2. dce.addTorchListener(self)
    // Add protocol requirements
    func didChangeTorchState(torchState: TorchState){
       // TODO add your code for torch listener
    }
    

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 4.x
    • Version 4.2.0
    • Version 4.0.2
    • Version 4.0.1
    • Version 4.0.0
  • Version 3.x
    • Version 3.0.3
    • Version 3.0.2
    • Version 3.0.1
    • Version 3.0.0
  • Version 2.x
    • Version 2.3.21
    • Version 2.3.20
    • Version 2.3.12
    • Version 2.3.11
    • Version 2.3.10
    • Version 2.3.5
    • Version 2.3.4
    • Version 2.3.3
    • Version 2.3.2
    • Version 2.3.1
    • Version 2.3.0
    • Version 2.1.4
    • Version 2.1.3
    • Version 2.1.1
    • Version 2.0.0
Change +