Torch Switch Control#

Defined in framework ScanditCaptureCore

SDCTorchSwitchControl#
@interface SDCTorchSwitchControl : NSObject <SDCControl>

Added in version 6.0.0

Control that allows to toggle the torch on and off. The torch switch control hides itself automatically in case the active frame source doesn’t have a torch.

You can add this control to a view by calling SDCDataCaptureView.addControl:.

+ torchSwitchControlFromJSONString:error:#
+ (nullable instancetype)torchSwitchControlFromJSONString:(nonnull NSString *)JSONString
                                                    error:(NSError **)error

Added in version 6.8.0

Constructs a new torch switch control with the provided JSON serialization. See Serialization for details.

torchOffImage#
@property (nonatomic, strong, nonnull) UIImage *torchOffImage

Added in version 6.2.0

Sets the image to use for the control button when the torch is off.

torchOffPressedImage#
@property (nonatomic, strong, nonnull) UIImage *torchOffPressedImage

Added in version 6.2.0

Sets the image to use for the control button when the torch is off and the button is pressed.

torchOnImage#
@property (nonatomic, strong, nonnull) UIImage *torchOnImage

Added in version 6.2.0

Sets the image to use for the control button when the torch is on.

torchOnPressedImage#
@property (nonatomic, strong, nonnull) UIImage *torchOnPressedImage

Added in version 6.2.0

Sets the image to use for the control button when the torch is on and the button is pressed.

- updateFromJSONString:error:#
- (BOOL)updateFromJSONString:(nonnull NSString *)JSONString
                       error:(NSError **)error

Added in version 6.8.0

Updates the control according to a JSON serialization. See Serialization for details.