Skip to content

Double-tapping PDF control does not update Zoom property on iOS #26

Description

@bengavin

When testing the latest Zoom updates on device, double-tapping the PDF invokes the platform level zoom operation, which doesn't fire the requisite ScaleChanged notifications, thus leaving the Zoom property out of sync with the control state. I've put together PR #24 to address this by inserting our own shim between the PDFKit UIController and the ScrollView.

Reproduction Steps:

  1. Bind PDF control Zoom property to UI controls
  2. Double-tap PDF to invoke platform zoom
  3. Notice that bound control doesn't update to current zoom value

Workaround:
A number of other approaches were tried locally, and this UIScrollViewDelegate shim seems to be the cleanest. The other option considered was a render-time CADisplayLink loop to monitor this current Zoom state. This was discarded due to the performance overhead and unnecessary polling when zoom levels are likely to change infrequently.

Verified:
Local iOS simulator
Local iPhone 13

Pinch to zoom, scrolling, etc seem to continue to work properly with the shim in place.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions