SBSDKBarcodeScannerViewController

@interface SBSDKBarcodeScannerViewController : SBSDKBaseScannerViewController

A UIViewController subclass to show a camera screen with the barcode detector. This class cannot be instanced from a storyboard. Instead it is installing itself as a child view controller onto a given parent view controller.

  • The delegate. See SBSDKBarcodeScannerViewControllerDelegate protocol. Weak.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<SBSDKBarcodeScannerViewControllerDelegate> delegate;

    Swift

    weak var delegate: SBSDKBarcodeScannerViewControllerDelegate? { get set }
  • Machine code types (EAN, DataMatrix, Aztec, QR, etc) that can be returned in didDetectBarcodes delegate method. When nil or empty - all codes can be returned. Default is nil.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSArray<SBSDKBarcodeType *> *acceptedBarcodeTypes;

    Swift

    var acceptedBarcodeTypes: [SBSDKBarcodeType]? { get set }
  • Additional parameters for tweaking the detection of barcodes.

    Declaration

    Objective-C

    @property (nonatomic, strong, nonnull) SBSDKBarcodeAdditionalParameters *additionalDetectionParameters;

    Swift

    var additionalDetectionParameters: SBSDKBarcodeAdditionalParameters { get set }
  • Bar code document types to limit detection results to. When nil or empty - all document can be returned. Default is nil.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSArray<SBSDKBarcodeDocumentType *> *acceptedDocumentTypes;

    Swift

    var acceptedDocumentTypes: [SBSDKBarcodeDocumentType]? { get set }
  • The barcode detectors engine mode. The default value is SBSDKBarcodeEngineModeNextGen.

    Declaration

    Objective-C

    @property (nonatomic) SBSDKBarcodeEngineMode engineMode;

    Swift

    var engineMode: SBSDKBarcodeEngineMode { get set }
  • Specifies the way of barcode images generation or disables this generation at all. Use, if you want to receive a full sized image with barcodes. Defaults to SBSDKBarcodeImageGenerationTypeNone.

    Declaration

    Objective-C

    @property (nonatomic) SBSDKBarcodeImageGenerationType barcodeImageGenerationType;

    Swift

    var barcodeImageGenerationType: SBSDKBarcodeImageGenerationType { get set }
  • Displays an augmented reality view that draws the frames, content and type text of the found barcodes when it finds them. Defaults to NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL selectionOverlayEnabled;

    Swift

    var selectionOverlayEnabled: Bool { get set }
  • The color for the overlays polygons around the barcodes. The default color is a blueish green.

    Declaration

    Objective-C

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

    Swift

    var selectionPolygonColor: UIColor { get set }
  • The color for the overlays polygons around the barcodes when highlighted. The default color is a blueish green.

    Declaration

    Objective-C

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

    Swift

    var selectionHighlightedPolygonColor: UIColor { get set }
  • The text format for the selection overlay. The default text format is SBSDKBarcodeOverlayFormatTypeCode. Has no effect if the delegate method barcodeScannerController:selectionOverlayTextFor: is implemented and returns a non-nil string.

    Declaration

    Objective-C

    @property (nonatomic) SBSDKBarcodeOverlayFormat selectionOverlayTextFormat;

    Swift

    var selectionOverlayTextFormat: SBSDKBarcodeOverlayFormat { get set }
  • The text color for the selection overlay. The default color is black.

    Declaration

    Objective-C

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

    Swift

    var selectionTextColor: UIColor { get set }
  • The text color for the selection overlay when highlighted. The default color is white.

    Declaration

    Objective-C

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

    Swift

    var selectionHighlightedTextColor: UIColor { get set }
  • The background color for the selection overlay text. The default color is red.

    Declaration

    Objective-C

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

    Swift

    var selectionTextContainerColor: UIColor { get set }
  • The background color for the selection overlay text when highlighted. The default color is red.

    Declaration

    Objective-C

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

    Swift

    var selectionHighlightedTextContainerColor: UIColor { get set }
  • 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 *)containerView;

    Swift

    init?(parentViewController: UIViewController, parentView containerView: UIView?)

    Parameters

    parentViewController

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

  • 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 *)containerView
                            delegate:
                                (nullable
                                     id<SBSDKBarcodeScannerViewControllerDelegate>)
                                    delegate;

    Swift

    init?(parentViewController: UIViewController, parentView containerView: UIView?, delegate: SBSDKBarcodeScannerViewControllerDelegate?)

    Parameters

    parentViewController

    The view controller the newly created instance is embedded into.

    delegate

    The delegate for the receiver. If parentViewController conforms to SBSDKBarcodeScannerViewControllerDelegate, it is automatically set as delegate.