PSPDFStylusTouch

@protocol PSPDFStylusTouch <NSObject>

Protocol for stylus touches.

  • Returns the point computed as the location in a given view of the gesture represented by the receiver. - parameter: view A UIView object on which the gesture took place. - returns: A point in the local coordinate system of view that identifies the location of the gesture.

    Declaration

    Objective-C

    - (CGPoint)locationInView:(nonnull UIView *)view;

    Swift

    optional func location(inView view: Any!) -> CGPoint

    Parameters

    view

    A UIView object on which the gesture took place.

    Return Value

    A point in the local coordinate system of view that identifies the location of the gesture.

  • The classification of the touch. Defines how the touch will be handled.

    Declaration

    Objective-C

    @optional
    @property (readonly, nonatomic) PSPDFStylusTouchClassification classification;

    Swift

    optional var classification: PSPDFStylusTouchClassification { get }
  • The pressure value of the touch on the screen. Can be between 0 and 1.

    Declaration

    Objective-C

    @optional
    @property (readonly, nonatomic) CGFloat pressure;

    Swift

    optional var pressure: CGFloat { get }