ios禁止左划返回手势

用到UIGestureRecognizerDelegate代理方法
直接加到viewDidLoad

id traget = self.navigationController.interactivePopGestureRecognizer.delegate;
UIPanGestureRecognizer * pan = [[UIPanGestureRecognizer alloc]initWithTarget:traget action:nil];
[self.view addGestureRecognizer:pan];

你可能感兴趣的:(ios禁止左划返回手势)