tabViewSidebarBottomBar(content:)
Adds a custom bottom bar to the sidebar of a tab view.
Declaration
nonisolated func tabViewSidebarBottomBar<Content>(@ViewBuilder content: () -> Content) -> some View where Content : View
Discussion
The content is pinned at the bottom of the sidebar, so it’s always visible when the sidebar is visible and doesn’t scroll with the content.
The following example adds an account button to the bottom of the sidebar:
TabView {
Tab("Home", systemImage: "house") {
HomeView()
}
Tab("Alerts", systemImage: "bell") {
AlertsView()
}
Tab("Browse", systemImage: "list.bullet") {
MyBrowseView()
}
}
.tabViewStyle(.sidebarAdaptable)
.tabViewSidebarBottomBar {
AccountButton()
}