iOS 手势

一.看这里


二.抽象类  UIGestureRecognizer

  • 继承于该类的有7类:轻点,捏合,拖拽,滑动,长按,旋转,边缘滑动;
  • 一个手势可以绑定多个事件 
    - (void)addTarget:(id)target action:(SEL)action;
  • 可以移除事件
    - (void)removeTarget:(nullable id)target action:(nullable SEL)action;

三.轻点手势 UITapGestureRecognizer

四.捏合手势 UIPinchGestureRecognizer

五.拖拽手势 UIPanGestureRecognizer

六.滑动手势 UISwipeGestureRecognizer

七.长按手势 UILongPressGestureRecognizer

八.边缘滑动手势  UIScreenEdgePanGestureRecognizer

原文地址:https://www.cnblogs.com/shidaying/p/6965113.html