i want to draw a line in core graphics in iphone.I am using Quartz for drawing. I want to fix the starting point of the line. How this can be done?
Asked
Active
Viewed 159 times
2 Answers
1
To draw a line just check this How do I draw a line on the iPhone?
And to detect touches and convert them into points do the following.....
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
// Retrieve the touch point
UITouch *touch=[[event allTouches]anyObject];
CGPoint point= [touch locationInView:touch.view];
}