1. 使用系統(tǒng)測滑手勢時(shí),當(dāng)視圖處于根頁面時(shí)點(diǎn)擊cell的同時(shí)測滑或測滑再點(diǎn)擊Cell 當(dāng)前頁面就會(huì)卡死狈蚤,特記錄一下解決方法:
//遵守UINavigationControllerDelegate協(xié)議
//@interface MyNavigationController ()<UINavigationControllerDelegate>
HomeViewController *home = [[HomeViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:home];
nav.delegate = self;
//或在UINavigationControllerDelegate類中self.delegate = self;
//實(shí)現(xiàn)代理方法
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
//set gesture yes when showViewController
if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
navigationController.interactivePopGestureRecognizer.enabled = YES;
}
// if rootViewController, set delegate nil
if (navigationController.viewControllers.count == 1) {
navigationController.interactivePopGestureRecognizer.enabled = NO;
navigationController.interactivePopGestureRecognizer.delegate = nil;
}
}
問題解決鏈接:http://www.reibang.com/p/4314b8569c2b