ACEDrawingView
ACEDrawingView copied to clipboard
Implementing 3D-Touch
I want to implement 3D-Touch and change the linewidth based on the pressure. In the touchesMoved I use this code to change the lineWidth:
CGFloat maximumPossibleForce = touch.maximumPossibleForce;
CGFloat force = touch.force;
CGFloat normalizedForce = force/maximumPossibleForce;
CGFloat lineWidth = normalizedForce * 10;
self.currentTool.lineWidth = lineWidth;
It works, however, when crossing lines with a previously drawn line, it overrides it. If anyone knows a solution I would greatly appreciate it! Thanks :)
Picture:
I got a similar problem when rotating the view.... I also get such annoying fragments :S