Post

Replies

Boosts

Views

Activity

Reply to NavigationSplitView hide sidebar toggle button
You can use the toolbar(_:for:) modifier on your sidebar view like this: .toolbar(.hidden, for: .navigationBar). You can find details in the documentation here. Here's the resulting view: struct SomeView: View { var body: some View { NavigationSplitView( columnVisibility: .constant(.all), sidebar: { Text("sidebar") .toolbar(.hidden, for: .navigationBar) }, detail: { Text("detail") } ) .navigationSplitViewStyle(.balanced) } } The first argument sets the visibility, and the second arguments specifies which bar to hide (which in your case is .navigationBar).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’23
Reply to NavigationSplitView hide sidebar toggle button
You can use the toolbar(_:for:) modifier on your sidebar view like this: .toolbar(.hidden, for: .navigationBar). You can find details in the documentation here. Here's the resulting view: struct SomeView: View { var body: some View { NavigationSplitView( columnVisibility: .constant(.all), sidebar: { Text("sidebar") .toolbar(.hidden, for: .navigationBar) }, detail: { Text("detail") } ) .navigationSplitViewStyle(.balanced) } } The first argument sets the visibility, and the second arguments specifies which bar to hide (which in your case is .navigationBar).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to On which target will Swift Student Challenge submissions run on, when choosing Xcode 14 on macOS 13?
I've noticed that Swift Playgrounds on macOS runs App Playgrounds as Mac Catalyst apps, so I suppose this would be the case for Xcode submissions too.
Replies
Boosts
Views
Activity
Apr ’23