how to get callback from tabBarMinimizeBehavior

Asked on 2025-08-22

1 search

To get a callback from tabBarMinimizeBehavior, you can use the Tab Bar Minimize Behavior modifier in SwiftUI or set the top bar minimize behavior in UIKit. This allows the tab bar to minimize on scroll and re-expand when scrolling in the opposite direction.

In SwiftUI, you can adopt this behavior by using the Tab Bar Minimize Behavior modifier. For example, in the TV app, the onscroll down behavior is used, which causes the tab bar to re-expand when scrolling in the opposite direction. You can also place a view above the bar with the Tab View Bottom accessory modifier to take advantage of the extra space provided by the tab bar's collapsing behavior.

In UIKit, you can configure the top bar to minimize on scroll by setting the top bar minimize behavior to the desired direction. For instance, the TV app sets it to onscroll down, and the tab bar re-expands when scrolling in the opposite direction. You can also create a UITab accessory with your content view and set the bottom accessory property on UITabbar controller to display an accessory view above the tab bar.

For more detailed implementation, you can refer to the sessions: