#pragma mark- 滑动
@property (nonatomic, strong)UISwipeGestureRecognizer *leftSwipeGestureRecognizer;
@property (nonatomic, strong)UISwipeGestureRecognizer *rightSwipeGestureRecognizer;
#pragma mark- 初始化滑动页面
-(void)handleSwipesInit{
self.leftSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc]
initWithTarget:self action:@selector(handleSwipes:)];
self.rightSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipes:)];
self.leftSwipeGestureRecognizer.direction = UISwipeGestureRecognizerDirectionLeft;
self.rightSwipeGestureRecognizer.direction = UISwipeGestureRecognizerDirectionRight;
[self.view addGestureRecognizer:self.leftSwipeGestureRecognizer];
[self.view addGestureRecognizer:self.rightSwipeGestureRecognizer];
}
#pragma mark- 滑动页面
- (void)handleSwipes:(UISwipeGestureRecognizer *)sender
{
if (sender.direction == UISwipeGestureRecognizerDirectionLeft) {
}
if (sender.direction == UISwipeGestureRecognizerDirectionRight) {
[self backingtomainview];
}
}