1、interactivePopGestureRecognizer是UISreenEdgePanGestureRecognizer的子类。
2. 当使用手势,返回时要监听是否真正返回,然后添加相应的消息传递。
首先想到是通过手势delegate的监听来完成。
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer。发现手势每次都会触发此方法。无法判断是否成功返回。
然后想到了用navigationController的delegate来监听。果然能达到想要效果
#pragma mark - UINavigationControllerDelegate
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(B