iOS BUG收录

1. 使用系统测滑手势时,当视图处于根页面时点击cell的同时测滑或测滑再点击Cell 当前页面就会卡死,特记录一下解决方法:

//遵守UINavigationControllerDelegate协议
//@interface MyNavigationController ()<UINavigationControllerDelegate>
HomeViewController *home = [[HomeViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:home];
nav.delegate = self;
//或在UINavigationControllerDelegate类中self.delegate = self;
//实现代理方法
- (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;
    }
}

问题解决链接:https://www.jianshu.com/p/4314b8569c2b

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Swift1> Swift和OC的区别1.1> Swift没有地址/指针的概念1.2> 泛型1.3> 类型严谨 对...
    cosWriter阅读 11,144评论 1 32
  • 我年过花甲,姥爷级别,好在简书涂鸦。最近,简村入驻一批美女,老夫寒舍也是门庭若市,每天有不少90后、95后、甚至0...
    沙_舟阅读 18,924评论 369 704
  • 几声啼哭,三个婴儿落地。 他们刚刚来到这个世界, 对一切都是那么的陌生,又那么的向往。 他们无忧无虑,快乐的成长。...
    糊涂蛋糊涂阅读 121评论 0 1
  • 清明放假,在家休息三天,周一回校,早上两节课,下午两节竞赛辅导,再加晚自修,嗷喔,今天赚发了…… 由于乡村改造工程...
    周伶丽阅读 233评论 0 5
  • 老婆不是秀给别人看的 放下身份的认同,首先要看到自己认同某样东西,也许没办法立刻放下,但是如果能彻底了解到自己认同...
    丽丽_8228阅读 87评论 0 0