when should I use hidesBottomBarWhenPushed

Asked on 11/09/2024

1 search

The hidesBottomBarWhenPushed property is used in iOS development to hide the bottom tab bar when a new view controller is pushed onto the navigation stack. This is particularly useful when you want to provide a more immersive experience by removing distractions, such as the tab bar, from the screen when navigating to certain views.

For example, if you have a tab-based application and you want to push a detail view that should not display the tab bar, you can set hidesBottomBarWhenPushed to true on the view controller being pushed. This will ensure that the tab bar is hidden during the transition to the new view.

This concept is not directly covered in the provided WWDC context, but it relates to navigation and UI transitions, which are discussed in sessions like "Enhance your UI animations and transitions" and "Elevate your tab and sidebar experience in iPadOS." These sessions cover best practices for navigation and UI design, which can be relevant when considering when to hide or show UI elements like the tab bar.