Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 如何在使用石英的绘图中确定线的起点?_Iphone_Objective C_Uiview_Quartz Graphics - Fatal编程技术网

Iphone 如何在使用石英的绘图中确定线的起点?

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

我想在iphone的核心图形中画一条线。我正在使用石英进行绘制。我想确定这条线的起点。如何做到这一点

在CoreGraphics中查找。

要画一条线,只需选中此项即可

要检测触摸并将其转换为点,请执行以下操作

- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
    // Retrieve the touch point

    UITouch *touch=[[event allTouches]anyObject];
    CGPoint point= [touch locationInView:touch.view];

}