UISwipeGestureRecognizerDirectionRight正在运行,但UISwipeGestureRecognizerDirectionDown无法正常工作

时间:2017-01-17 18:52:37

标签: ios iphone uigesturerecognizer

如果我添加一个向下手势识别器,那么它不起作用,如果我将其更改为UISwipeGestureRecognizerDirectionRight,那么它可以工作。

    UISwipeGestureRecognizer *swipeDownRecognizer =
      [[UISwipeGestureRecognizer alloc] initWithTarget:_delegate
                                                action:@selector(statusViewDidDismiss:)];
    swipeDownRecognizer.direction = UISwipeGestureRecognizerDirectionDown;
    [swipeDownRecognizer setNumberOfTouchesRequired:1];
    [self addGestureRecognizer:swipeDownRecognizer];

0 个答案:

没有答案