SBSDKBaseScannerGeneralConfiguration

@interface SBSDKBaseScannerGeneralConfiguration : NSObject

The general configuration object for a ‘SBSDKBaseScannerViewController’ and its subclasses.

  • The video frame resolution of the preview layer. Defaults to ‘SBSDKVideoFrameResolutionAuto’. Higher resolutions may improve scanning results but slow down the scanning performance. In some cases a higher resolution may even decrease the scanning quality. It is therefore recommended to keep this setting at SBSDKVideoFrameResolutionAuto.

    Declaration

    Objective-C

    @property (nonatomic) SBSDKVideoFrameResolution videoFrameResolution;

    Swift

    var videoFrameResolution: SBSDKVideoFrameResolution { get set }
  • The content mode of the video preview layer: fit-in or fill-in. Defaults to SBSDKVideoContentModeFillIn.

    Declaration

    Objective-C

    @property (nonatomic) SBSDKVideoContentMode videoContentMode;

    Swift

    var videoContentMode: SBSDKVideoContentMode { get set }
  • The prioritization of still image quality and capturing speed. Defaults to SBSDKCapturePhotoQualityPrioritizationBalanced. If you experience lots of blurry still images try to set this property to SBSDKCapturePhotoQualityPrioritizationQuality.

    Note: Has no effect on devices prior to iOS 13.0!

    Declaration

    Objective-C

    @property (nonatomic) SBSDKCapturePhotoQualityPrioritization photoQualityPrioritization;

    Swift

    var photoQualityPrioritization: SBSDKCapturePhotoQualityPrioritization { get set }
  • If set to YES, the camera session will be stopped entirely, when the base scanner view controller disappears, and restarts when the it reappears. The base scanner view controller will cause no CPU load after it disappeared.

    NO will NOT stop the camera session, but pauses the delivery of video frames from the camera session to the base scanner view controller. There is some low CPU activity while the base scanner view controller is not on screen, but there is also no delay when the receiver returns to the screen.

    Declaration

    Objective-C

    @property (nonatomic) BOOL stopsCameraSessionWhenDisappeared;

    Swift

    var stopsCameraSessionWhenDisappeared: Bool { get set }
  • Disables auto-focus and locks the lens at the specified focus lens position. The default value is NO.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isFocusLockEnabled) BOOL focusLockEnabled;

    Swift

    var isFocusLockEnabled: Bool { get set }
  • The position of the lens. Values can be between 0.0f (minimum focusing distance) and 1.0f (maximum focusing distance). The value will be clamped to [0.0f, 1.0f]. The default value is 0.0.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat focusLockPosition;

    Swift

    var focusLockPosition: CGFloat { get set }
  • Whether the receiver plays a flash-light animation when capturing images or not. Defaults to NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL playFlashAnimation;

    Swift

    var playFlashAnimation: Bool { get set }
  • To prevent blurred images before the video frame is sent to the detector, the device must have registered no significant motion for a certain amount of time. This property defines this amount of time. By default it is set to 0.0 seconds for the most scanners.

    Declaration

    Objective-C

    @property NSTimeInterval minimumTimeWithoutDeviceMotionBeforeDetection;

    Swift

    var minimumTimeWithoutDeviceMotionBeforeDetection: TimeInterval { get set }
  • This is the default configuration with the properties initialized as mentioned in their description.

    Declaration

    Objective-C

    + (nonnull instancetype)defaultConfiguration;

    Swift

    class func `default`() -> Self

    Return Value

    The default general configuration object which can be changed and then passed back to the base scanner view controller.