PSPDFStylusDriverDelegate

@protocol PSPDFStylusDriverDelegate <NSObject>

Called on stylus events.

  • Connection changed.

    Declaration

    Objective-C

    - (void)connectionStatusChanged;

    Swift

    func connectionStatusChanged()
  • Button with buttonNumber has been pressed. Return YES to mark this button firing as processed; this will disable the default processing like triggering an undo or redo action.

    Declaration

    Objective-C

    - (BOOL)buttonFired:(NSUInteger)buttonNumber;

    Swift

    optional func buttonFired(_ buttonNumber: UInt) -> Bool
  • Called when a button classification changes.

    Declaration

    Objective-C

    - (void)classificationsDidChangeForTouches:(nonnull NSSet *)touches;

    Swift

    optional func classificationsDidChange(forTouches touches: Set<AnyHashable>)
  • If the driver has its own touch delivery mechanism, this returns object that implement the PSPDFStylusTouch protocol. Some drivers might instead require a manual call to touchInfoForTouch:.

    Declaration

    Objective-C

    - (void)stylusTouchBegan:(nonnull NSSet *)touches;

    Swift

    optional func stylusTouchBegan(_ touches: Set<AnyHashable>)
  • Undocumented

    Declaration

    Objective-C

    - (void)stylusTouchMoved:(NSSet *)touches;

    Swift

    optional func stylusTouchMoved(_ touches: Set<AnyHashable>)
  • Undocumented

    Declaration

    Objective-C

    - (void)stylusTouchEnded:(NSSet *)touches;

    Swift

    optional func stylusTouchEnded(_ touches: Set<AnyHashable>)
  • Undocumented

    Declaration

    Objective-C

    - (void)stylusTouchCancelled:(NSSet *)touches;

    Swift

    optional func stylusTouchCancelled(_ touches: Set<AnyHashable>)
  • Some SDKs use a pen detection system that suggest gesture blocking.

    Declaration

    Objective-C

    - (void)stylusSuggestsToDisableGestures;

    Swift

    optional func stylusSuggestsToDisableGestures()
  • Undocumented

    Declaration

    Objective-C

    - (void)stylusSuggestsToEnableGestures;

    Swift

    optional func stylusSuggestsToEnableGestures()