BoundingBoxOutline

@objc(BoundingBoxOutline)
public class BoundingBoxOutline : NSObject
  • Declaration

    Swift

    public init(fontSize: CGFloat = 14.0)
  • Add shape and text to parent layer

    Declaration

    Swift

    @objc(parent:)
    public func addToLayer(_ parent: CALayer)

    Parameters

    parent

    parent CALayer

  • Show Bounding box.

    Declaration

    Swift

    @objc(frame:label:color:textColor:)
    public func show(frame: CGRect, label: String, color: UIColor, textColor: UIColor = .black)

    Parameters

    frame

    CGRect of coordinates to draw box

    label

    Classified label

    color

    Color of bounding box outline

    textColor

    Classified label text

  • Hide bounding box from appearing in view.

    Declaration

    Swift

    @objc
    public func hide()