Configure the UI Elements
| Available Buttons |
|---|
| Torch button |
| Camera toggle button |
| Close button (BarcodeScanner API only) |
BarcodeScanner provides a set of UI elements that you can easily customize.

buttons
- Torch button: A clickable button that turns the torch on or off.
- Camera toggle button: A clickable button that switches the front/back-facing camera.
- Close button: Stops barcode scanning and returns to the previous activity.
- Objective-C
- Swift
@property (nonatomic, strong) DSCameraView *cameraView; self.cameraView = [[DSCameraView alloc] initWithFrame:self.view.bounds]; [self.cameraView setTorchButtonVisible:YES]; self.cameraView.cameraToggleButtonVisible = YES;let cameraView = self.cameraView cameraView?.torchButtonVisible = true cameraView?.cameraToggleButtonVisible = true
Related APIs