Tool

@objc(PESDKTool) open class Tool: NSObject

A Tool is an abstract base class. Currently FreehandTool is the only concrete subclass and it is used to handle touch events and draw primitives.

  • true if touch events occurred, false otherwise.

    Declaration

    Swift

    fileprivate(set) open var moved = false
  • Called at the beginning of a touch event.

    Declaration

    Swift

    open func gestureBegan(_ recognizer: UIGestureRecognizer)

    Parameters

    recognizer

    The recognizer that recognized the event.

  • Called multiple times during a touch event.

    Declaration

    Swift

    open func gestureMoved(_ recognizer: UIGestureRecognizer)

    Parameters

    recognizer

    The recognizer that recognized the event.

  • Called when a touch event ended.

    Declaration

    Swift

    open func gestureEnded(_ recognizer: UIGestureRecognizer)

    Parameters

    recognizer

    The recognizer that recognized the event.

  • Called when a touch event canceled.

    Declaration

    Swift

    open func gestureCanceled(_ recognizer: UIGestureRecognizer)

    Parameters

    recognizer

    The recognizer that recognized the event.