Collapse Sidebar Sections by Default
Collapses the section in the sidebar by default.
Platform Compatibility
Tags
SwiftUI Code
TabView {
TabSection("Foo") {
Tab("1", systemImage: "1.circle") {
Text("0")
}
}
.defaultSectionExpansion(.collapsed)
TabSection("Bar") {
Tab("3", systemImage: "3.circle") {
Text("2")
}
}
TabSection("FooBar") {
Tab("5", systemImage: "5.circle") {
Text("4")
}
}
}
.tabViewStyle(.sidebarAdaptable)