Tool

@objcMembers
@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.

Properties

  • true if touch events occurred, false otherwise.

    Declaration

    Swift

    open private(set) var moved: Bool { get }

Methods

  • Called at the beginning of a touch event.

    Declaration

    Swift

    open func gestureBegan(_ recognizer: UIGestureRecognizer, in view: UIView)

    Parameters

    recognizer

    The recognizer that recognized the event.

    view

    The view that this event was recognized in.

  • Called multiple times during a touch event.

    Declaration

    Swift

    open func gestureMoved(_ recognizer: UIGestureRecognizer, in view: UIView)

    Parameters

    recognizer

    The recognizer that recognized the event.

    view

    The view that this event was recognized in.

  • Called when a touch event ended.

    Declaration

    Swift

    open func gestureEnded(_ recognizer: UIGestureRecognizer, in view: UIView)

    Parameters

    recognizer

    The recognizer that recognized the event.

    view

    The view that this event was recognized in.

  • Called when a touch event was cancelled.

    Declaration

    Swift

    open func gestureCancelled(_ recognizer: UIGestureRecognizer, in view: UIView)

    Parameters

    recognizer

    The recognizer that recognized the event.

    view

    The view that this event was recognized in.