SBSDKUIDocumentScannerViewController
@interface SBSDKUIDocumentScannerViewController : SBSDKUICameraViewController
A highly customizable camera-based view controller to scan documents. An edge-detection based algorithm finds documents in the camera stream. A manual or automatic high resolution snapshot can be made. Based on the detected area of the document in the photo, the photo is cropped and perspective-corrected, so that a nice flattened image of the document only is created.
-
Creates a new instance of ‘SBSDKUIDocumentScannerViewController’ and presents it modally.
Declaration
Objective-C
+ (nonnull instancetype) presentOn:(nonnull UIViewController *)presenter withDocument:(nullable SBSDKUIDocument *)document withConfiguration: (nonnull SBSDKUIDocumentScannerConfiguration *)configuration andDelegate: (nullable id<SBSDKUIDocumentScannerViewControllerDelegate>) delegate;
Swift
class func present(on presenter: UIViewController, with document: SBSDKUIDocument?, with configuration: SBSDKUIDocumentScannerConfiguration, andDelegate delegate: SBSDKUIDocumentScannerViewControllerDelegate?) -> Self
Parameters
presenter
The view controller the new instance should be presented on.
document
The document to which the scanned pages will be added. If nil the receiver creates a new document.
configuration
The configuration to define look and feel of the new scanning view controller.
delegate
The delegate of the new scanning view controller.
Return Value
A new instance of ‘SBSDKUIDocumentScannerViewController’.
-
Creates a new instance of ‘SBSDKUIDocumentScannerViewController’ and presents it modally. Creates a new ‘SBSDKUIDocument’ instance.
Declaration
Objective-C
+ (nonnull instancetype) presentOn:(nonnull UIViewController *)presenter withConfiguration: (nonnull SBSDKUIDocumentScannerConfiguration *)configuration andDelegate: (nullable id<SBSDKUIDocumentScannerViewControllerDelegate>) delegate;
Swift
class func present(on presenter: UIViewController, with configuration: SBSDKUIDocumentScannerConfiguration, andDelegate delegate: SBSDKUIDocumentScannerViewControllerDelegate?) -> Self
Parameters
presenter
The view controller the new instance should be presented on.
configuration
The configuration to define look and feel of the new scanning view controller.
delegate
The delegate of the new scanning view controller.
Return Value
A new instance of ‘SBSDKUIDocumentScannerViewController’.
-
Creates a new instance of ‘SBSDKUIDocumentScannerViewController’.
Declaration
Objective-C
+ (nonnull instancetype) createNewWithDocument:(nullable SBSDKUIDocument *)document configuration: (nonnull SBSDKUIDocumentScannerConfiguration *)configuration andDelegate: (nullable id<SBSDKUIDocumentScannerViewControllerDelegate>) delegate;
Swift
class func createNew(with document: SBSDKUIDocument?, configuration: SBSDKUIDocumentScannerConfiguration, andDelegate delegate: SBSDKUIDocumentScannerViewControllerDelegate?) -> Self
Parameters
document
The document to which the scanned pages will be added. If nil the receiver creates a new document.
configuration
The configuration to define look and feel of the new scanning view controller.
delegate
The delegate of the new scanning view controller.
Return Value
A new instance of ‘SBSDKUIDocumentScannerViewController’.
-
Creates a new instance of ‘SBSDKUIDocumentScannerViewController’. Generates a new instance of ‘SBSDKUIDocument’.
Declaration
Objective-C
+ (nonnull instancetype) createNewWithConfiguration: (nonnull SBSDKUIDocumentScannerConfiguration *)configuration andDelegate: (nullable id<SBSDKUIDocumentScannerViewControllerDelegate>) delegate;
Swift
class func createNew(with configuration: SBSDKUIDocumentScannerConfiguration, andDelegate delegate: SBSDKUIDocumentScannerViewControllerDelegate?) -> Self
Parameters
configuration
The configuration to define look and feel of the new scanning view controller.
delegate
The delegate of the new scanning view controller.
Return Value
A new instance of ‘SBSDKUIDocumentScannerViewController’.
-
The receivers delegate.
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<SBSDKUIDocumentScannerViewControllerDelegate> delegate;
Swift
weak var delegate: SBSDKUIDocumentScannerViewControllerDelegate? { get set }
-
The receivers current settings.
Declaration
Objective-C
@property (nonatomic, readonly, nonnull) SBSDKUIDocumentScannerSettings *currentSettings;
Swift
var currentSettings: SBSDKUIDocumentScannerSettings { get }