4 ms·
Swizzle UIApplication.sendEvent to intercept the pencil touches sent to the WKWebView’s gestures and redirect them to an overlaid, disabled PKCanvasView’s inter
by wll 5y ago
Swizzle UIApplication.sendEvent to intercept the pencil touches sent to the WKWebView’s gestures and redirect them to an overlaid, disabled PKCanvasView’s intercepted gestures; call the original gestures’ touchesEnded. Cache the gestures in a weakToWeak NSMapTable for successive events. contentSize, contentOffset, and zoomScale syncing is trivial.
I have it working even without swizzling using custom drawing engines. The issue lies within the dynamic and changing nature of the web and cross-device/size display unless you imagined it as one-off raster drawing.
- aaomidi 5y agoHmm I'll give this a try. Do you have this open-source so I can take a look?