Contents

TabBarMinimizeBehavior

A behavior that determines when a tab bar minimizes.

Declaration

struct TabBarMinimizeBehavior

Overview

A minimized tab bar becomes smaller so that the content behind it has more room. Pass a value of this type to the tabBarMinimizeBehavior(_:) modifier to specify the behavior.

The following example minimizes the tab bar as soon as someone scrolls down through a feed, and restores it when they scroll back up:

TabView {
    Tab("Feed", systemImage: "list.bullet") {
        FeedView()
    }

    Tab("Profile", systemImage: "person") {
        ProfileView()
    }
}
.tabBarMinimizeBehavior(.onScrollDown)

Topics

Type Properties

See Also

Configuring a tab bar