aryaxt / iOS-Slide-Menu

iOS Slide Menu with ability to add both left and right menu, and built in gesture recognizer. Similar to Path and Facebook
Other
1.53k stars 359 forks source link

Exit to a new storyboard without navigation #186

Closed Aleph72 closed 8 years ago

Aleph72 commented 8 years ago

Hello, I'm using iOS Slide Menu and so far I like it. There's one thing that I'm not able to figure out: by pressing a button in the left menu I need to switch to another storyboard that doesn't have a navigation controller. If I do:

UIStoryboard *currentStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
HDLoginViewController *vc = [currentStoryboard instantiateViewControllerWithIdentifier:@"login"];
[[SlideNavigationController sharedInstance] popAllAndSwitchToViewController:vc withSlideOutAnimation:YES andCompletion:nil];

the app moves to the storyboard I need, but it keeps the menu navigation controller. Is there anyway to eliminate the navigation controller when switching storyboards? Thanks.

aryaxt commented 8 years ago

Hide the navbar

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationController_Class/#//apple_ref/occ/instm/UINavigationController/setNavigationBarHidden:animated:

Aleph72 commented 8 years ago

I tried, but the navbar is not a subview of the left menu, it's a subview of the home viewcontroller.

aryaxt commented 8 years ago

navbar is the subview of the navigationController, navigationcontroller is shared across the viewcontrollers in the stack. If you call that in the viewDidLoad of the controller you want to not have a bar it should just work