SnapscreenSnapperDelegate

@protocol SnapscreenSnapperDelegate <NSObject>

Provides callbacks from the SnapscreenSnapper.

  • Snapping did occur and did find at least one result.

    Declaration

    Objective-C

    - (void)snapscreenSnapperDidSnapResult:
        (SnapscreenSearchResult *_Nonnull)snapResult;

    Swift

    func snapscreenSnapperDidSnapResult(_ snapResult: SnapscreenSearchResult)

    Parameters

    snapResult

    The result of the snap. Contains at least one result entry.

  • Snapping did occur but did not yield any results.

    Declaration

    Objective-C

    - (void)snapscreenSnapperDidSnapNoResult;

    Swift

    func snapscreenSnapperDidSnapNoResult()
  • Snapping did fail with an error.

    Declaration

    Objective-C

    - (void)snapscreenSnapperDidFailWithError:(NSError *_Nullable)error;

    Swift

    func snapscreenSnapperDidFailWithError(_ error: Error?)

    Parameters

    error

    An error object containing an error with a SnapscreenErrorCode. See SnapscreenErrorCode for a list of possible error codes.

  • Snapper did detect a quadrangle. Note that the quadrangle is detected in the orientation (= device orientation) and resolution of the provided sample buffer and may need to be scaled and rotated according to your UI presentation.

    Declaration

    Objective-C

    - (void)snapscreenSnapperDidDetectQuadrangleWithTopLeft:(CGPoint)topLeft
                                                   topRight:(CGPoint)topRight
                                                bottomRight:(CGPoint)bottomRight
                                                 bottomLeft:(CGPoint)bottomLeft;

    Swift

    func snapscreenSnapperDidDetectQuadrangle(withTopLeft topLeft: CGPoint, topRight: CGPoint, bottomRight: CGPoint, bottomLeft: CGPoint)

    Parameters

    topLeft

    top left point of the quadrangle

    topRight

    top right point of the quadrangle

    bottomRight

    bottom right point of the quadrangle

    bottomLeft

    bottom left point of the quadrangle

  • Snapper did not detect a quadrangle in the provided buffer

    Declaration

    Objective-C

    - (void)snapscreenSnapperDidLoseQuadrangle;

    Swift

    func snapscreenSnapperDidLoseQuadrangle()