Post

Replies

Boosts

Views

Activity

Reply to Sidebar on macOS?
Sidebar is just a List with the listStyle of SidebarListStyle applied to it, like this: List { 	/* ... contents of the sidebar ... */ } .listStyle(SidebarListStyle()) You can use NavigationView to display the sidebar side by side with your app's content: NavigationView { 	Sidebar() 	MainContent() } Sidebar can be customised in any way you like, it's a simple SwiftUI List.
Jun ’20
Reply to .toolbar modifier positions buttons at the bottom of the view
You can wrap your button in a ToolbarItem, and explicitly specify the placement, like this: .toolbar { 		ToolbarItem(placement: ToolbarItemPlacement.navigationBarTrailing) { 				Button("Add", action: makeSandwich) 		} } You can see all of the values of the ToolbarItemPlacement in the documentation. - https://developer.apple.com/documentation/swiftui/toolbaritemplacement As for .navigationBarItems, I'm pretty sure this modifier is not supported on macOS natively, only if you make a Catalyst app. If you want a cross-platform view, you should rather opt for .toolbar.
Jun ’20