最佳答案
听起来很简单. . 握住 Trackpad,移动手指,释放. . 但是不知怎么的滑动没有被触发(反而触发了平底锅)
UISwipeGestureRecognizer *swipeGesture = [[UISwipeGestureRecognizer alloc]
initWithTarget:v action:@selector(handleSwipe:)];
swipeGesture.direction= UISwipeGestureRecognizerDirectionUp;
[v addGestureRecognizer:swipeGesture];
而是由上面的序列识别 Pan。
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc]
initWithTarget:v action:@selector(handlePan:)];
[v addGestureRecognizer: panGesture];
如果“ pan”被注释了,那么同样的手势可以识别滑动. . 这里有两个问题: