FaceDetectionView

public class FaceDetectionView : UIView, FaceDetectionViewProtocol

This class defines UIView which will be tracking face area on video feed.

  • Object must be initialized with colors for default bahaivor.

    Declaration

    Swift

    public init(positiveDetectionColor: UIColor, negativeDetectionColor: UIColor)

    Parameters

    positiveDetectionColor

    when face detected and best shot search process began this color will be used as border color for default tracking frame

    negativeDetectionColor

    when face not found or best shot errors appeared, this color will be used as border color for default tracking frame

  • This method should be used in case of custom bahivor and inheritence

    Declaration

    Swift

    public override init(frame: CGRect)

    Parameters

    frame

    as usually frame rect

  • Undocumented

    Declaration

    Swift

    required public init?(coder: NSCoder)
  • When face was found and can be tracked this method will be launched. Base implementation simply changes the colors of border. You can override this method to implement your own logic

    Declaration

    Swift

    public func switchToPositiveState()
  • When face was found but can not be tracked by different reasons and errors this method will be launched. Base implementation simply changes the colors of border. You can override this method to implement your own logic

    Declaration

    Swift

    public func switchToNegativeState()