Closed Adenc closed 1 year ago
Modify the Demo code as follows Step1: Line 39 in MMClipView.m
path1 = [UIBezierPath complexShape1]; path2 = [UIBezierPath splitterPath];
Step2: Line 87 in MMClipView.m
[[UIColor blackColor] setStroke]; [path1 setLineWidth:3 / scale]; [path1 stroke]; [[UIColor greenColor] setStroke]; [path2 setLineWidth:3 / scale]; [path2 stroke]; NSArray *intersections = [path1 intersectionWithPath:path2]; for (UIBezierPath *path in intersections) { [[UIColor redColor] setStroke]; [path setLineWidth:4 / scale]; [path stroke]; }
The result is difference path but intersection path.
I have solved the problem, both paths must be in the same direction.
Modify the Demo code as follows Step1: Line 39 in MMClipView.m
Step2: Line 87 in MMClipView.m
The result is difference path but intersection path.