Я хотел бы позволить пользователю рисовать кривые таким образом, чтобы ни одна строка не пересекала другую линию или даже сама. Рисование кривых не проблема, и я даже обнаружил, что могу создать путь, который закрыт и по-прежнему довольно похож на линию, отслеживая узлы линии вперед и назад, а затем закрывая путь.
К сожалению, iOS предоставляет только проверку того, содержится ли точка в закрытом пути (containsPoint: и CGPathContainsPoint). К сожалению, пользователь может довольно легко перемещать свой палец достаточно быстро, чтобы сенсорные точки приземлялись по обеим сторонам существующего пути, фактически не содержащиеся в этом пути, поэтому тестирование сенсорных точек довольно бессмысленно.
Я не могу найти никакого "пересечения" метода путей.
Любые другие мысли о том, как выполнить эту задачу?