Someone on Reddit suggested using PencilKit for the notepad, rather than a "homebrew" solution. Here is a page with some documentation: https://developer.apple.com/documentation/pencilkit