anotherview-eu / InfiniteCanvasPencilDrawing

Simple drawing app using PencilKit
MIT License
10 stars 0 forks source link

Implementing Pinch to Zoom #1

Open knightbenax opened 3 years ago

knightbenax commented 3 years ago

Hi, do you have any idea how pinch to zoom could be implemented to this? I have implemented the traditional way the same way as I was using UIScrollView but once I try to zoom, the content disappears.

anotherview-eu commented 3 years ago

I'm not sure if you're experiencing the same issue, but I "disabled" the trick during zooming. That is, make contentInset = .zero in scrollViewWillBeginZooming, and compute and set the new negative contentInset in scrollViewDidEndZooming. Hope it helps.