I am running into an issue where my navigation controller becomes unusable after initiating then canceling the new iOS 7 back swipe gesture.
Some relevant information:
- My app has a home page with various activity pages.
- The home page hides the navigation bar in viewWillAppear
The home page un-hides the navigation bar in viewWillDisappear
-(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; // Let's hide the navbar when we show the home view [self.navigationController setNavigationBarHidden:YES]; … } -(void) viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; // Let's hide the navbar when we show the home view [self.navigationController setNavigationBarHidden:NO]; }
When a user taps a activity icon on the home page the view controller for the activity is pushed onto the stack.
If a user starts to use the new back swipe gesture in iOS but then stops the gesture (i.e. decides not to go back) everything looks ok. However, if a user causes another view controller to get pushed on the nav stack the nag bar then becomes unusable and the user can not navigate back from the current view controller.
Notes
- It only happens when I show/hide the navigation bar
- I can still slowly perform the back gesture and everything will work fine as long as I don't cancel the gesture
- The nav bar seems like it will work but hitting the back button doesn't pop the view controller.
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
– bachonk