Hiding/Showing the navigation Bar on menu Reveal/Hide
PeerLabs opened this issue · 0 comments
PeerLabs commented
New to iOS so forgive me if this seems basic....
With the following SideMenuController Configuration...
// SideMenu Drawing Configuration
SideMenuController.preferences.drawing.menuButtonImage = UIImage(named: "menuButtonIcon")
SideMenuController.preferences.drawing.sidePanelWidth = 250
SideMenuController.preferences.drawing.centerPanelShadow = true
SideMenuController.preferences.drawing.sidePanelPosition = .overCenterPanelLeft
// SideMenu Animating Configuration
SideMenuController.preferences.animating.transitionAnimator = FadeAnimator.self
SideMenuController.preferences.animating.statusBarBehaviour = .horizontalPan
// SideMenu Interaction Configuration
SideMenuController.preferences.interaction.panningEnabled = true
SideMenuController.preferences.interaction.swipingEnabled = true
I want the following behaviour:
- When the menu reveals itself... I want the NavBar to hide itself (this is because the Menu is actually going to be a transparent overlay)
- When the menu hides itself... I want the NavBar to reveal itself
Any ideas?
I tried to Hide/Show the navbar with the following:
func sideMenuControllerDidHide(_ sideMenuController: SideMenuController) {
log.debug("Started!")
self.navigationController?.isNavigationBarHidden = false
self.navigationController?.hidesBarsOnSwipe = false
self.navigationController?.hidesBarsOnTap = false
}
func sideMenuControllerDidReveal(_ sideMenuController: SideMenuController) {
log.debug("Started!")
self.navigationController?.hidesBarsOnSwipe = true
self.navigationController?.hidesBarsOnTap = true
self.navigationController?.isNavigationBarHidden = true
}
But to no avail...
Appreciate some guidance