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. The default value is nil, the common code types are being detected; see [SBSBDKBarcodeType commonTypes].

    Declaration

    Objective-C

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

    Swift

    var acceptedBarcodeTypes: [SBSDKBarcodeType]? { get set }
  • Filter for extended EAN and UPC barcodes. By default the filter is disabled (SBSDKBarcodesExtensionFilterNoFilter).

    Declaration

    Objective-C

    @property (nonatomic) SBSDKBarcodesExtensionFilter extensionFilter;

    Swift

    var extensionFilter: SBSDKBarcodesExtensionFilter { 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.

    Note: This property has no effect if isTrackingOverlayEnabled is set to YES. With the tracking overlay enabled, barcode images cannot be generated.

    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 isTrackingOverlayEnabled;

    Swift

    var isTrackingOverlayEnabled: Bool { get set }
  • The barcode tracking overlay controller that shows the detected barcodes. Assign its delegate or set a new instance to take over control of the tracked barcode overlay.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nonnull) SBSDKBarcodeTrackingOverlayController *trackingOverlayController;

    Swift

    var trackingOverlayController: SBSDKBarcodeTrackingOverlayController { get }
  • 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:
                                                   (nonnull UIView *)containerView;

    Swift

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

    Parameters

    parentViewController

    The view controller the newly created instance is embedded into.

    containerView

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

  • 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:(nonnull 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.

    containerView

    The view the newly created instance is embedded into.

    delegate

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