Same problem.
struct ContentView: View {
var body: some View {
NavigationSplitView {
List {
Text("row 1")
Text("row 2")
Text("row 3")
}
} detail: {
HSplitView {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.toolbar(id: "toolbar", content: {
ToolbarItem {
Button("bb", action: onToolbar)
}
ToolbarItem {
Button("cc", action: onToolbar)
}
})
.padding()
Text("right")
}
}.navigationTitle("")
}
func onToolbar() {}
}
FAULT: NSInternalInconsistencyException: NSToolbar 0x600001f10f30 already contains an item with the identifier com.apple.SwiftUI.splitViewSeparator-0. Duplicate items of this type are not allowed.; {
NSAssertFile = "NSToolbar.m";
NSAssertLine = 1609;
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: