Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for iOS

SBSBarcodePickerBase Class Reference

Inherits UIViewController.

Inherited by SBSBarcodePicker, and ScanditSDKBarcodePicker.

Instance Methods

Barcode Decoder Operation
(BOOL) - isScanning
 
Camera Selection
(BOOL) - supportsCameraFacing:
 
(BOOL) - changeToCameraFacing:
 
(BOOL) - switchCameraFacing
 
Torch Control
(void) - switchTorchOn:
 
Zoom control
(BOOL) - setRelativeZoom:
 

Properties

SBSCameraFacingDirection cameraFacingDirection
 
AVCaptureVideoOrientation cameraPreviewOrientation
 
BOOL autoFocusOnTapEnabled
 
BOOL pinchToZoomEnabled
 

Detailed Description

Implements the base functionality for the pre-4.7 and 4.7+ picker.

Method Documentation

- (BOOL) isScanning

Returns YES if scanning is in progress.

Since
1.0.0
Returns
boolean indicating whether scanning is in progress.

Implemented in ScanditSDKBarcodePicker.

- (BOOL) supportsCameraFacing: (SBSCameraFacingDirection facing

Returns whether the specified camera facing direction is supported by the current device.

Since
3.0.0
Parameters
facingThe camera facing direction in question.
Returns
Whether the camera facing direction is supported
- (BOOL) changeToCameraFacing: (SBSCameraFacingDirection facing

Changes to the specified camera facing direction if it is supported.

Since
3.0.0
Parameters
facingThe new camera facing direction
Returns
Whether the change was successful
- (BOOL) switchCameraFacing

Changes to the opposite camera facing if it is supported.

Since
3.0.0
Returns
Whether the change was successful
- (void) switchTorchOn: (BOOL)  on

Switches the torch (if available) on or off programmatically.

There is also a method in the ScanditSDKOverlayController to add a torch icon that the user can click to activate the torch.

Parameters
onYES when the torch should be switched on, NO if the torch should be turned off.

By default the torch switch is off.

Since
2.0.0
- (BOOL) setRelativeZoom: (float)  zoom

Sets the zoom to the given percentage of the maximum analog zoom possible.

Parameters
zoomThe percentage of the max zoom (between 0 and 1)
Returns
Whether setting the zoom was successful

Note that this value might be overwritten by the relative zoom value of the scan settings (SBSScanSettings::relativeZoom), if the scan settings are applied after this method has been called.

Since
4.7.0

Property Documentation

- (SBSCameraFacingDirection) cameraFacingDirection
readnonatomicassign

The facing direction of the used camera.

Since
2.0.0
- (AVCaptureVideoOrientation) cameraPreviewOrientation
readwritenonatomicassign

The orientation of the camera preview.

The orientation of the camera preview. In general the preview's orientation will be as wanted, but there may be cases where it needs to be set individually. This does not change the orientation of the overlayed UI elements.

Possible values are: AVCaptureVideoOrientationPortrait, AVCaptureVideoOrientationPortraitUpsideDown, AVCaptureVideoOrientationLandscapeLeft, AVCaptureVideoOrientationLandscapeRight

- (BOOL) autoFocusOnTapEnabled
readwritenonatomicassign

Whether tapping on the screen should trigger an auto-focus.

By default, the camera triggers an auto-focus whenever the user taps the screen. To disable this feature, set this property to NO.

- (BOOL) pinchToZoomEnabled
readwritenonatomicassign

Whether pinch to zoom is enabled.

By default, the camera preview zoom factor can be changed by using a pinch gesture. To disable this feature, set this property to NO. The feature is only available on devices with iOS 7 and greater.

Since
4.15

The documentation for this class was generated from the following file: