Post

Replies

Boosts

Views

Activity

Reply to MacOS create sidebar on the right and left with SwiftUI
I have trided multiple things but I cannot find the solutions. De left side works fine like this: struct LeftSidebar: View { @EnvironmentObject var appState: AppState var body: some View { VStack { List { NavigationLink(destination: HomeMac()) { Label("Home", systemImage: "house.fill") } Section(header: Text("SF-symbolen")) { NavigationLink(destination: HomeMac()) { Label("Alle", systemImage: "square.grid.2x2") } // NavigationLink(destination: NieuwView()) { // Label("Nieuw", systemImage: "star") // } } Spacer() Button(action: { appState.logOut() }) { HStack { Image(systemName: "arrow.backward.circle") Text("Loguit") } } } .listStyle(SidebarListStyle()) .frame(minWidth: 50) } .padding() } } var body: some View { ZStack { NavigationView { LeftSidebar() .environmentObject(appState) HomeMac() RightSidebar() } .frame(minWidth: 800, minHeight: 600) } } } But when I want to try this its not working the same.
May ’24