ユーザーが指で画面にさまざまな色で描画できるアプリを作成しています。描画は UIBezierPaths で描画されますが、消しゴムが必要です。背景画像を色として使用する単なるパスである消しゴムがありましたが、この方法ではメモリの問題が発生します。消しゴムを選択したときに描かれたパスからポイントを削除したいと思います。
Unfortunately UIBezierPath doesn't have a subtraction function so I want to make my own. So if eraser is selected, it will look at all the points that should be erased and see if any of the existing paths contain those points, then subdivide the path leaving a blank spot. But it should be able to see how many points in a row to delete not do it one at a time. In theory it makes sense but I'm having trouble getting started on the implementation.
Anyone have any guidance to set me on the right 'path'?