假设有一个继承UINavigationController的子类,想要隐藏navigationBar,同时又想支持又滑返回功能

如果直接设置self.navigationBarHidden = YES;,那同时也会屏蔽又滑返回功能

  • 解决办法1:

self.navigationBarHidden = NO;
self.navigationBar.hidden = YES;

  • 解决办法2:

self.navigationBarHidden = NO;
self.interactivePopGestureRecognizer.delegate = self;

参考:http://stackoverflow.com/questions/19833939/uinavigationcontoller-interactivepopgesturerecognizer-inactive-when-navigation-b

本文固定链接: http://www.js-code.com/ios/ios_53246.html