在NavigationController堆棧內(nèi)的UIViewController可以支持右滑手勢颂跨,即在屏幕左邊一滑跨释,屏幕就會返回官地。但是在自定義返回按鈕這個手勢就會失效缔俄。解決方法找到兩種:
- 重新設(shè)置手勢的delegate
self.navigationController.interactivePopGestureRecognizer.delegate= (id)self;
- 自己響應這個手勢的事件
[self.navigationController.interactivePopGestureRecognizeraddTarget:self action:@selector(handleGesture:)];