🖌 Infinite canvas using PencilKit
MIT License
This example project shows how to create an "infinite" canvas using PencilKit. It's not really infinite but it's a canvas so huge that users will most likely regard it infinite.
The approach is the following:
When doing state restoration, you don't want to place the user in the middle of the canvas. Instead you should place the user in the middle of their drawing.
I use the strokes property of a PKDrawing to calculate the frame of a drawing in the canvas. This is needed to show the arrows that help the user navigate the canvas.
All source code is licensed under the MIT License.