I created a window using NavigationSplitView,
and also set WindowGroup{}.windowToolbarStyle(.unifiedCompact).
I found that the toolbar items became smaller. In comparison, Xcode's toolbar also has a narrower vertical height, but the items maintain their original size. How is this achieved?
import SwiftUI
@main
struct ThreeSideViewerApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
.windowToolbarStyle(.unifiedCompact)
}
}
struct ContentView: View {
@State var show: Bool = true
var body: some View {
NavigationSplitView
{
Text("SideBar")
}
detail: {
Text("detail")
}
}
}