SBSDKUIBarcodeScannerViewController
@interface SBSDKUIBarcodeScannerViewController : SBSDKUICameraViewController
A highly customizable camera-based view controller to detect QR and bar codes.
-
Creates a new instance of ‘SBSDKUIBarcodeScannerViewController’ and presents it modally.
Declaration
Objective-C
+ (nonnull instancetype) presentOn:(nonnull UIViewController *)presenter configuration:(nonnull SBSDKUIBarcodeScannerConfiguration *)configuration andDelegate: (nullable id<SBSDKUIBarcodeScannerViewControllerDelegate>)delegate;
Swift
class func present(on presenter: UIViewController, configuration: SBSDKUIBarcodeScannerConfiguration, andDelegate delegate: SBSDKUIBarcodeScannerViewControllerDelegate?) -> Self
Parameters
presenter
The view controller the new instance should be presented on.
configuration
The configuration to define look and feel of the new detection view controller.
delegate
The delegate of the new detection view controller.
Return Value
A new instance of ‘SBSDKUIBarcodeScannerViewController’.
-
Creates a new instance of ‘SBSDKUIBarcodeScannerViewController’.
Declaration
Objective-C
+ (nonnull instancetype) createNewWithConfiguration: (nonnull SBSDKUIBarcodeScannerConfiguration *)configuration andDelegate: (nullable id<SBSDKUIBarcodeScannerViewControllerDelegate>) delegate;
Swift
class func createNew(with configuration: SBSDKUIBarcodeScannerConfiguration, andDelegate delegate: SBSDKUIBarcodeScannerViewControllerDelegate?) -> Self
Parameters
configuration
The configuration to define look and feel of the new detection view controller.
delegate
The delegate of the new detection view controller.
Return Value
A new instance of ‘SBSDKUIBarcodeScannerViewController’.
-
Enables or disables the QR/bar code detection.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isRecognitionEnabled) BOOL recognitionEnabled;
Swift
var isRecognitionEnabled: Bool { get set }
-
The receivers delegate.
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<SBSDKUIBarcodeScannerViewControllerDelegate> delegate;
Swift
weak var delegate: SBSDKUIBarcodeScannerViewControllerDelegate? { get set }
-
Freezes the cameras preview layer by stopping the camera session.
Declaration
Objective-C
- (void)freezeCamera;
Swift
func freezeCamera()
-
Unfreezes the previously frozen cameras preview layer by restarting the camera session.
Declaration
Objective-C
- (void)unfreezeCamera;
Swift
func unfreezeCamera()