How to draw a freehand drawing on UIView
rather than UIImageView
using touches moved method. I have many other subviews on this view so i cannot add image view as whole view.I have seen many examples but they are drawing in UIImageView
.
Asked
Active
Viewed 1,062 times
3

Hamed Rajabi Varamini
- 3,439
- 3
- 24
- 38

Prerna chavan
- 3,179
- 7
- 35
- 77
-
Do you mean draw a line, circle or point? – Hamed Rajabi Varamini Nov 23 '11 at 05:52
-
It can be anything, a line,circle or point. – Prerna chavan Nov 23 '11 at 06:04
2 Answers
2
You must use from their features. For lines, you just save two points on it, it is better to save its head and tail. For circle just save its center and radius. And For each points just save a pixel as a center. At the end of it, if your objects have some features as a color, thickness or ... just add these features inside of other features that I said.
I hope it be useful for you!

Hamed Rajabi Varamini
- 3,439
- 3
- 24
- 38