检测UIBezierPath冲突ios

时间:2014-11-20 22:33:08

标签: ios ios8 uibezierpath

我们如何检测两个UIBezierPath是否发生冲突。 我有UIBezierPath A,我用

画线
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 

方法

我已经有另一个UIBezierPath B.

如何检测A在移动时是否与B碰撞。

干杯。

1 个答案:

答案 0 :(得分:0)

你不能保留一个包含UIBezierPath B点的数组吗?当你开始绘制UIBezierPath A时,可以用

进行检查
UIBezierPath containsPoint 

实例方法您正在移动或添加的点是否与UIBezierPath B阵列中现有的点发生碰撞(相等)?