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
snapResultThe 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
errorAn error object containing an error with a
SnapscreenErrorCode. SeeSnapscreenErrorCodefor 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
topLefttop left point of the quadrangle
topRighttop right point of the quadrangle
bottomRightbottom right point of the quadrangle
bottomLeftbottom left point of the quadrangle
-
Snapper did not detect a quadrangle in the provided buffer
Declaration
Objective-C
- (void)snapscreenSnapperDidLoseQuadrangle;Swift
func snapscreenSnapperDidLoseQuadrangle()
SnapscreenSnapperDelegate Protocol Reference