iphone开发中的手势操作:初

      iphone上的手势操作有许多种,包括轻击、触摸、拖动、轻扫等。开发中与四个方法有很大关联:

四个方法的参数都是(NSSet *) touches  及(UIEvent *)event。
 
touches 中的每一个对象都是一个UITouch事件。
 

NSUInteger numTaps = [[touches anyObject] tapCount];  


NSUInteger numTouches = [touches count]; 


UITouch *touch = [touches anyObject];

CGPoint point = [touch locationInView:self]; 


现在用得比较多的时利用ios里面的Automatic Gesture Recognition方式实现,其主要用到的类是UIGestureRecognizer的各种子类。。。

原文地址:https://www.cnblogs.com/mybkn/p/2417421.html