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:
- Bind PDF control Zoom property to UI controls
- Double-tap PDF to invoke platform zoom
- 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.
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:
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.