Post

Replies

Boosts

Views

Activity

How to avoid the sidebar from the NavigationView on macOS?
Using SwiftUI on macOS, is there a way to make a NavigationView without a Sidebar? With the following code: NavigationView { EmptyView() .frame(minWidth: 0, idealWidth: 0, maxWidth: 0) ScrollView { HStack { Text("Text 1") Spacer() } } .toolbar { Button("Button 1") {} } ScrollView { Text("Text 2") } .toolbar { Button("Button 2") {} } } .navigationTitle("Title") I get this result: But what I want to achieve is this: Kind of like this window from Shortcuts (which is said to be built with SwiftUI):
0
0
652
Aug ’21
How to avoid the sidebar from the NavigationView on macOS?
Using SwiftUI on macOS, is there a way to make a NavigationView without a Sidebar? With the following code: NavigationView { EmptyView() .frame(minWidth: 0, idealWidth: 0, maxWidth: 0) ScrollView { HStack { Text("Text 1") Spacer() } } .toolbar { Button("Button 1") {} } ScrollView { Text("Text 2") } .toolbar { Button("Button 2") {} } } .navigationTitle("Title") I get this result: But what I want to achieve is this: Kind of like this window from Shortcuts (which is said to be built with SwiftUI):
Replies
0
Boosts
0
Views
652
Activity
Aug ’21