Swipe back - interactivePopGestureRecognizer not working

假如想象 提交于 2019-11-30 01:17:57

问题


I have screens like this photo. HomeViewController will push to maintabbar, and a tabbar item will push to detailScreen. Why swipe back not working. I think it is default in IOS. Please help me

p/s: If i use SwipeBack in cocoapods, it working. But i don't want use it


回答1:


Try setting the interactive pop gesture recognizer delegate to nil:

self.navigationController.interactivePopGestureRecognizer.delegate = nil;



回答2:


I have similar problem & got fixed using method from this answer

Simply, did you call

[super viewWillAppear:animated];

when overriding

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    // your other codes goes on
}


来源:https://stackoverflow.com/questions/34943916/swipe-back-interactivepopgesturerecognizer-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!