SBSDKBaseScannerGeneralConfiguration

@interface SBSDKBaseScannerGeneralConfiguration : NSObject

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

  • 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 priorization 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 photoQualityPriorization;

    Swift

    var photoQualityPriorization: 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 }
  • 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.