听起来很简单.Hold the Trackpad, move the finger, release..但不知何故没有触发滑动(而是触发了平移)
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];
如果对平移进行了注释,则通过相同的手势识别卷帘.有了这个,有两个问题:
- What is the difference then between a pan and a swipe?个
- How can one simulate a swipe on iPhone simulator?个