Iphone 如何在使用石英的绘图中确定线的起点?
我想在iphone的核心图形中画一条线。我正在使用石英进行绘制。我想确定这条线的起点。如何做到这一点 在CoreGraphics中查找。要画一条线,只需选中此项即可 要检测触摸并将其转换为点,请执行以下操作Iphone 如何在使用石英的绘图中确定线的起点?,iphone,objective-c,uiview,quartz-graphics,Iphone,Objective C,Uiview,Quartz Graphics,我想在iphone的核心图形中画一条线。我正在使用石英进行绘制。我想确定这条线的起点。如何做到这一点 在CoreGraphics中查找。要画一条线,只需选中此项即可 要检测触摸并将其转换为点,请执行以下操作 - (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { // Retrieve the touch point UITouch *touch=[[event allTouches]anyObject
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
// Retrieve the touch point
UITouch *touch=[[event allTouches]anyObject];
CGPoint point= [touch locationInView:touch.view];
}