问题标签 [skitch]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - Draw arrow with pan using objective c
What I've got working:
I have been trying to add an arrow to an app, but am having the a most difficult time getting it to do what it needs to do. The arrow needs to be drawn from a start point as represented by a finger touch and increase in size while the user drags a finger across the screen. The arrow then must stop drawing one the finger is lifted.
What I'm having trouble with:
The arrow must be able to rotate around both the start point and the end point when the user touches a point a either end of the arrow and drags a finger in a direction. While rotating, the arrow must be able to increase and decrease it's size.
I am able to get the arrow to somewhat rotate around the start point, but with issues. Rotating around the end point causes a "fish tailing" effect. I'm pretty sure the way I'm doing it is completely wrong, but I don't know of any other way. This is why asking the community to steer me in the right direction.