navigationController.navigationBar becomes visible after leaving the TOWevViewController
Usipov opened this issue · 1 comments
Usipov commented
Hello there!
Thanx for the amazing tool you've created
Please take a look at a small problem I've confronted
- (void)viewDidLoad
{
[super viewDidLoad];
if (self.navigationController) {
self.hideToolbarOnClose = self.navigationController.toolbarHidden;
self.hideNavBarOnClose = self.navigationBar.hidden;
}
...
In some rare cases it may occur, that viewDidLoad gets called before the view controller gets inserted in the navigation controller's stack. This will cause the toolbar to appear after the view disappears
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
if (self.beingPresentedModally == NO) {
[self.navigationController setToolbarHidden:self.hideToolbarOnClose animated:animated];
[self.navigationController setNavigationBarHidden:self.hideNavBarOnClose animated:animated];
}
}
Could you please move your code
if (self.navigationController) {
self.hideToolbarOnClose = self.navigationController.toolbarHidden;
self.hideNavBarOnClose = self.navigationBar.hidden;
}
to the viewWillAppear: method ?
Thanx in advance
TimOliver commented
Thanks for that! Done! :)