2011-11-14 36 views

回答

1

要畫一條線只檢查這個How do I draw a line on the iPhone?

,並檢測觸摸並將其轉換爲點做以下.....

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

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

} 
+0

感謝您的幫助 – vipul