Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS draw line with both arrow with start-end point while finger touch end and rotate from start or end point

I need help making a drawing demo.

When the user draws a line using their finger, the line has directional arrows on both ends. When their finger releases, it draws the line with "?" (question-mark) in center of the line.

Then, when user taps on the "?", it will show a new view and the user can enter a value, and the value is in that line.

And we can add multiple lines on capture-image and also we can delete selected line.

I don't understand how can I start developing these features so please give me an idea or any link, or suggestion to start develop this feature.

enter image description here

like image 285
Nikunj Jadav Avatar asked Jun 26 '14 06:06

Nikunj Jadav


1 Answers

You should use a UITapGestureRecognizer and a UIBezierPath. Have it so that person taps at one point and then taps at a second point, then make a UIBezierPath between the two points. To get the question mark in the middle you could make it so that the line goes from the first point to (half the distance between point 1 and point 2 - 20pt). And then do the same with the other half of the line (so that you now have a space in the middle of the line.

like image 169
Wyetro Avatar answered Sep 20 '22 17:09

Wyetro