SBSDKIDCardScannerViewController

@interface SBSDKIDCardScannerViewController : UIViewController

A camera based view controller to detect and recognize personal ID cards on video frames or automatically captured still images. Currently limited to german ID cards.

  • The receivers delegate.

    Declaration

    Objective-C

    @property (nonatomic, weak, readonly) id<SBSDKIDCardScannerViewControllerDelegate> _Nullable delegate;

    Swift

    weak var delegate: SBSDKIDCardScannerViewControllerDelegate? { get }
  • If set to YES, detects and recognizes on live video frames. If set to NO it detects on live video frames, then captures a still images and does recognition on the still image. Defaults to NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL useLiveRecognition;

    Swift

    var useLiveRecognition: Bool { get set }
  • Enables or disables the card detection. Default is YES

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isRecognitionEnabled) BOOL recognitionEnabled;

    Swift

    var isRecognitionEnabled: Bool { get set }
  • The accepted minimal sharpness score. Images with a score less than that will be rejected with blurry status.

    0 - any image will be accepted. 80 - a good compromise; the recommended setting. 100 - only very sharp images will be accepted.

    The default value is 80.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat sharpnessAcceptanceFactor;

    Swift

    var sharpnessAcceptanceFactor: CGFloat { get set }
  • If set to YES, displays a viewfinder to help the user aligning the device with the ID card. NO hides the viewfinder. Defaults to YES.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showViewFinder;

    Swift

    var showViewFinder: Bool { get set }
  • The background color of the viewfinder surroundings. Defaults to transparent white.

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *_Nonnull viewFinderBackgroundColor;

    Swift

    var viewFinderBackgroundColor: UIColor { get set }
  • The line color of the viewfinder. Defaults to opaque white.

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *_Nonnull viewFinderLineColor;

    Swift

    var viewFinderLineColor: UIColor { get set }
  • The line width of the viewfinder. Defaults to 2 points.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat viewFinderLineWidth;

    Swift

    var viewFinderLineWidth: CGFloat { get set }
  • Defines a minimum inset for capturing frame. Default is UIEdgeInsetsMake(44, 20, 32, 20).

    Declaration

    Objective-C

    @property (nonatomic) UIEdgeInsets viewFinderMinimumInset;

    Swift

    var viewFinderMinimumInset: UIEdgeInsets { get set }
  • Set to YES to enable the video light of the device. May help in dark environments but may also cause unwanted reflections on ID cards. Defaults to NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL flashLightEnabled;

    Swift

    var flashLightEnabled: Bool { get set }
  • Returns if camera session supports flash light.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isFlashLightAvailable;

    Swift

    var isFlashLightAvailable: Bool { get }
  • Not available.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Not available.

    Declaration

    Objective-C

    + (nonnull instancetype)new;
  • Designated initializer. Installs the receiver as child view controller onto the parent view controllers view using its entire bounds area.

    Declaration

    Objective-C

    - (nullable instancetype)
        initWithParentViewController:
            (nonnull UIViewController *)parentViewController
                          parentView:(nullable UIView *)parentView
                            delegate:
                                (nonnull
                                     id<SBSDKIDCardScannerViewControllerDelegate>)
                                    delegate;

    Swift

    init?(parentViewController: UIViewController, parentView: UIView?, delegate: SBSDKIDCardScannerViewControllerDelegate)

    Parameters

    parentViewController

    The view controller the newly created instance is embedded into. If parentViewController conforms to SBSDKIDCardScannerViewControllerDelegate, it is automatically set as delegate.

    parentView

    The view the newly created instance is embedded into. If nil the parentViewControllers view is used.

    delegate

    The delegate of the receiver.