CameraViewControllerDelegate

@objc
public protocol CameraViewControllerDelegate

The CameraViewControllerDelegate protocol defines methods that allow you to handle captured images and user actions.

Note

Component API only.
  • Called when a user takes a picture, imports a PDF/QRCode or imports one or several images. Once the method has been implemented, it is necessary to check if the number of documents accumulated doesn’t exceed the minimun (GiniImageDocument.maxPagesCount).

    Declaration

    Swift

    @objc
    func camera(_ viewController: CameraScreen,
                didCapture document: GiniCaptureDocument)

    Parameters

    viewController

    CameraScreenViewController where the documents were taken.

    document

    One or several documents either captured or imported in the CameraViewController. They can contain an error produced in the validation process.

  • Called when a user selects a picker from the picker selector sheet.

    Declaration

    Swift

    @objc
    func camera(_ viewController: CameraScreen, didSelect documentPicker: DocumentPickerType)

    Parameters

    viewController

    CameraViewController where the documents were taken.

    documentPicker

    DocumentPickerType selected in the sheet.

  • Called when the CameraViewController appears.

    Declaration

    Swift

    @objc
    func cameraDidAppear(_ viewController: CameraScreen)

    Parameters

    viewController

    Camera view controller that appears.

  • Called when a user taps the MultipageReviewButton (the one with the thumbnail of the images(s) taken). Once this method is called, the MultipageReviewViewController should be presented.

    Declaration

    Swift

    @objc
    func cameraDidTapReviewButton(_ viewController: CameraScreen)

    Parameters

    viewController

    Camera view controller where the button was tapped.