The following code works as expected to display two separate Liquid Glass toolbar buttons with space between them:
struct ContentView: View {
var body: some View {
NavigationStack {
Text("Hello, World")
.toolbar {
ToolbarItem {
Button("Add", systemImage: "plus") { }
}
ToolbarSpacer(.fixed)
ToolbarItem {
Menu {
Button("Settings", systemImage: "gearshape") { }
} label: {
Label("More", systemImage: "ellipsis")
}
}
}
}
}
}
When optimizing for iPhone Duo (and in general) I understand the recommendation is to replace custom "more" menus with the system overflow menu, otherwise it's possible you can see two ... buttons in various scenarios.
struct ContentView: View {
var body: some View {
NavigationStack {
Text("Hello, World")
.toolbar {
ToolbarItem {
Button("Add", systemImage: "plus") { }
}
ToolbarSpacer(.fixed)
ToolbarOverflowMenu {
Button("Settings", systemImage: "gearshape") { }
}
}
}
}
}
This unexpectedly places both + and ... inside the same shared Liquid Glass background. How do you separate / add space between them, or is this a bug, is there a workaround?
Before / After