LCBestShotDelegate

Objective-C

@protocol LCBestShotDelegate <NSObject>

Swift

protocol LCBestShotDelegate : NSObjectProtocol

Delegate of the best shot detector.

  • Called when a face is detected in the shot.

    Declaration

    Objective-C

    - (void)detectionRect:(CGRect)rect inFrameSize:(CGSize)frameSize;

    Swift

    func detectionRect(_ rect: CGRect, inFrameSize frameSize: CGSize)

    Parameters

    rect

    Detection area.

    frameSize

    Frame size.

  • Called when the best shot is found.

    Note

    If false is returned, a process of the best shot detection will continue, otherwise the process will be paused. Recall a resume method to continue the process after a pause.

    Declaration

    Objective-C

    - (BOOL)bestShot:(nonnull LCBestShot *)bestShot;

    Swift

    func bestShot(_ bestShot: LCBestShot) -> Bool

    Parameters

    bestShot

    The best shot of the face.

    Return Value

    Return true, if the new best shots are no longer needed.

  • Called if an error has occurred.

    Declaration

    Objective-C

    - (void)bestShotError:(nonnull NSError *)error;

    Swift

    func bestShotError(_ error: Error)

    Parameters

    error

    Error.

  • Called if check for liveness is active.

    Declaration

    Objective-C

    - (void)livenessIsActive:(BOOL)isActive;

    Swift

    optional func livenessIsActive(_ isActive: Bool)

    Parameters

    isActive

    true if check for liveness is currently carried out.