SBSDKUIDocumentScannerBehaviorConfiguration

@interface SBSDKUIDocumentScannerBehaviorConfiguration : NSObject

Configuration for the behavior of the document scanning screen.

  • Whether auto-snapping is enabled or not.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isAutoSnappingEnabled) BOOL autoSnappingEnabled;

    Swift

    var isAutoSnappingEnabled: Bool { get set }
  • Whether user guidance is enabled while auto-snapping is disabled.

    Declaration

    Objective-C

    @property (nonatomic) BOOL forceUserGuidance;

    Swift

    var forceUserGuidance: Bool { get set }
  • Whether multi-page snapping is enabled or not.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isMultiPageEnabled) BOOL multiPageEnabled;

    Swift

    var isMultiPageEnabled: Bool { get set }
  • Whether flash is toggled on or off.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isFlashEnabled) BOOL flashEnabled;

    Swift

    var isFlashEnabled: Bool { get set }
  • The scaling factor for captured images. Values are clamped to the range 0.0 - 1.0.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat imageScale;

    Swift

    var imageScale: CGFloat { get set }
  • Limits the maximum size of the document image. If width or height are zero, this property is effectively ignored. Defaults to CGSizeZero.

    Declaration

    Objective-C

    @property (nonatomic) CGSize documentImageSizeLimit;

    Swift

    var documentImageSizeLimit: CGSize { get set }
  • The sensitivity of auto-snapping. Values are clamped to the range 0.0 - 1.0. A value of 1.0 triggers automatic snapping immediately, a value of 0.0 delays the automatic by 3 seconds.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat autoSnappingSensitivity;

    Swift

    var autoSnappingSensitivity: CGFloat { get set }
  • The minimum delay in seconds between two consecutive automatic image captures. Defaults to 0.0 secs.
    Set to higher values if after capturing a document image the same document is captured again too quickly.

    Declaration

    Objective-C

    @property (nonatomic) NSTimeInterval autoSnappingDelay;

    Swift

    var autoSnappingDelay: TimeInterval { get set }
  • The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document. Default is 75.0. Set lower values to accept more perspective distortion. Warning: Lower values result in more blurred document images.

    Declaration

    Objective-C

    @property (nonatomic) double acceptedAngleScore;

    Swift

    var acceptedAngleScore: Double { get set }
  • The minimum size in percent (0 - 100) of the screen size to accept a detected document. It is sufficient that height or width match the score. Default is 80.0. Warning: Lower values result in low resolution document images.

    Declaration

    Objective-C

    @property (nonatomic) double acceptedSizeScore;

    Swift

    var acceptedSizeScore: Double { get set }
  • The video layers content mode.

    Declaration

    Objective-C

    @property (nonatomic) SBSDKVideoContentMode cameraPreviewMode;

    Swift

    var cameraPreviewMode: SBSDKVideoContentMode { get set }
  • If set to YES, ignores the aspect ratio warning.

    Declaration

    Objective-C

    @property (nonatomic) BOOL ignoreBadAspectRatio;

    Swift

    var ignoreBadAspectRatio: Bool { get set }
  • The default image filter type for new documents pages. Defaults to SBSDKImageFilterTypeNone.

    Declaration

    Objective-C

    @property (nonatomic) SBSDKImageFilterType defaultPageFilter;

    Swift

    var defaultPageFilter: SBSDKImageFilterType { get set }
  • If set to YES, the default, the camera session will be stopped entirely, when the receiver disappears and restarts when the receiver reappears. There is no CPU usage while the receiver is not on screen.

    NO will NOT stop the camera session, but pause the delivery of video frames and QR codes. There is some very low CPU activity while the receiver is not on screen, but there is also no lag when the receiver returns to the screen.

    Declaration

    Objective-C

    @property (nonatomic) BOOL stopsCameraSessionWhenDisappeared;

    Swift

    var stopsCameraSessionWhenDisappeared: Bool { get set }
  • Maximum number of pages to scan. Ignored when set to nil, or when multiPageEnabled is NO. Default is nil.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSNumber *maxNumberOfPages;

    Swift

    var maxNumberOfPages: NSNumber? { get set }
  • The mode of the document detector to be used for document outline detection. The default value can be set via + (void)setDefaultDetectorMode:(SBSDKDocumentDetectorMode)newDefaultDetectorMode;. If not set specifically the default value is SBSDKDocumentDetectorModeMachineLearning.

    Declaration

    Objective-C

    @property (nonatomic) SBSDKDocumentDetectorMode detectorMode;

    Swift

    var detectorMode: SBSDKDocumentDetectorMode { 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 }
  • Required aspect ratios for detector. If not nil or empty, only polygons resulting in crops with one of the required aspect ratios will be returned. The default value is nil.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSArray<SBSDKAspectRatio *> *requiredAspectRatios;

    Swift

    var requiredAspectRatios: [SBSDKAspectRatio]? { get set }