Trackpad and Mouse Support in Our iOS Viewer

PSPDFKit provides built-in support for input from an indirect pointer (trackpad or mouse) on iPad and Mac Catalyst. We recommend enabling UIApplicationSupportsIndirectInputEvents in your app’s Info.plist to enhance some functionality.

Pointer Hover Effects

On iPad, PSPDFKit uses UIPointerInteraction to display hover effects to hint at possible actions and make the app feel more responsive. On Mac Catalyst, similar effects are achieved using NSCursor.

PSPDFKit incorporates hover effects for:

  • Text on PDF pages

  • The resizing knobs on selected annotations

  • Rows of buttons using PSPDFToolbar (including the annotation toolbar and the Document Editor toolbar)

  • Document tabs using PDFTabbedViewController

  • And many other parts of the UI

Read more about this implementation in our Supporting Pointer Interactions blog post.

Scrolling

All scrollable areas in PSPDFKit may be scrolled using the standard scroll mechanism of the input device (for example, with a mouse wheel or with two-finger scrolling on a trackpad). Users with a vertical mouse wheel can scroll horizontally by holding shift on a hardware keyboard. (This is a standard feature on iOS and macOS.)

Secondary Click

Where appropriate, PSPDFKit uses system contextual menus and responds to secondary clicks. If UIApplicationSupportsIndirectInputEvents is enabled in your app’s Info.plist, it will be possible to reset color presets in the annotation inspector by secondary clicking. Without this, users will need to long click.

You can read more about the ideas behind our approach and get some ideas for your own pointer device implementation in our Level Up Your Trackpad Support Using UIInteraction blog post.