sebk / FreeHandDrawingOverview

some freehand ios drawing implementations
9 stars 4 forks source link

How to draw a point. #1

Open paritoshraval100 opened 11 years ago

paritoshraval100 commented 11 years ago

i can not able to draw a point with SmoothedBIView. it is working with touchmoved method not with touchbegan.

sebk commented 11 years ago

The touches... methods aren't supporting this feature. Maybe you can implement it by yourself. My assumption would be something like this: Define a BOOL to track if the user moved the finger. E.g. set it to YES in touchesMoved and in touchesEnd check if this BOOL var is YES. When not the user wants to draw a point. Then you can draw a circle in the graphics context.

Have a look here: http://www.ifans.com/forums/threads/tutorial-drawing-to-the-screen.132024/ I didn't test it but it looks like the way I would try to implement it. Hope it helps.

paritoshraval100 commented 10 years ago

i did it in your code by writing this code and it is working fine.

}