1,觸摸開始,當手指剛接觸屏幕的時候觸發web
-(void)touchesBegan:(NSSetspa
*)touches withEvent:(UIEvent *)event對象
2,移動觸摸點,當手指在屏幕上移動的時候觸發繼承
-(void)touchesMoved:(NSSet事件
*)touches withEvent:(UIEvent *)eventit
3,取消觸摸,電話打入的時候會觸發此事件io
-(void)touchesCancelled:(NSSetevent
*)touches withEvent:(UIEvent *)eventwebkit
4,結束觸摸,當手指離開屏幕的時候觸摸此事件方法
-(void)touchesEnded:(NSSet
*)touches withEvent:(UIEvent *)event
UITouch *touch = [touches anyObjecys];//獲取觸摸點集合 CGPoint *currentPoint = [touch locationInView:self];//獲取當前觸摸點的座標
CGPoint *prePoint = [touch previousLocationInView:self];//獲取上一個觸摸點的座標