Search code examples
iphoneswapuiswipegesturerecognizer

UISwipeGestureRecognizer - perform action with 2 finger and 3 finger swipe - iOS


How to detect UISwipeGestureRecognizer 2 finger swipe or 3 finger swipe on the same View- iOS

any one have idea ?


Solution

  • Here "setMinimumNumberOfTouches" depends on your fingers(Eg:2/3/4/5). Try it once ..it may help to u

      UIPanGestureRecognizer *pan;
     pan = [[UIPanGestureRecognizer alloc] initWithTarget:self     action:@selector(Swipe4ScrollViews:)];
    [pan setMinimumNumberOfTouches:2];
     [_scroll1 addGestureRecognizer:pan];
      [pan release];