Open paritoshraval100 opened 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.
i did it in your code by writing this code and it is working fine.
(void)touchesBegan:(NSSet )touches withEvent:(UIEvent )event { if ([signLbl superview]){ [signLbl removeFromSuperview]; } ctr = 0; UITouch *touch = [touches anyObject]; pts[0] = [touch locationInView:self];
CGPoint start = pts[0]; CGPoint end = CGPointMake(start.x + 1.5, start.y
[path moveToPoint:start]; [path addLineToPoint:end];
}
i can not able to draw a point with SmoothedBIView. it is working with touchmoved method not with touchbegan.