// 滑动手指的个数
numberOfTouchesRequired
// 手指滑动的方向 (Up,Down,Left,Right)
direction
- UISwipeGestureRecognizer *swipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] init];
- [swipeGestureRecognizer addTarget:self action:@selector(gestureRecognizerHandle:)];
- [swipeGestureRecognizer setNumberOfTouchesRequired:2];
- [swipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionRight];
- [self.view addGestureRecognizer:swipeGestureRecognizer];
- [swipeGestureRecognizer release];
//这个也可以直接在storyboard中实现
2.在设置页面进行设置
这样就可以不通过代码来实现页面之间的切换方式