Adopt the new look of macOS covered how to create a full screen sidebar in AppKit, but I'm not able to figure out how to accomplish this with SwiftUI. Any ideas as to what I'm missing?
I already filed FB7776520 in case it's not possible, but I'm assuming I'm missing something since it's a marquee feature. Thanks!
Update: If I replace HSplitView with NavigationView it works as expected. 🤦♂️
Code Block swift @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { @State var strings: [String] = ["A", "B", "C"] @State var selection: String? var body: some View { HSplitView { List(selection: $selection) { ForEach(strings, id: \.self) { string in Text(string) } } .listStyle(SidebarListStyle()) VStack { Spacer() Text(selection ?? "<none>") .frame(idealWidth: 100, maxWidth: .infinity, alignment: .center) Spacer() } } } }
I already filed FB7776520 in case it's not possible, but I'm assuming I'm missing something since it's a marquee feature. Thanks!
Update: If I replace HSplitView with NavigationView it works as expected. 🤦♂️