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 }
  • Specifies the amount of frames barcode scanner takes before detecting. Uses the sharpest frame. So setting more frames generally improves recognition quality, but reduces recognition speed. Keep in mind, that detectionRate also has influence on recognition speed, as it determines the amount of frames that can be read per second. Default to 5.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger barcodeAccumulatedFramesCount;

    Swift

    var barcodeAccumulatedFramesCount: Int { 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.