To whom it may concern that deals with bugs in SwiftUI for iOS 26:
Inadvertently discovered a bug which duplicates ToolbarItem in any placement in the toolbar when navigationBarBackButtonHidden is set to true.
.toolbar{
ToolbarItem(placement: .confirmationAction) {
Button("Stop", systemImage: "stop.fill"){
//some action
}
}
}
.navigationBarBackButtonHidden(true)
Expected Behavior Show the ToolbarItem
Actual Behavior Duplicates items in the placement position.
Thank you.
Hello extraman,
Thank you for reporting this issue. Can you please provide the code for the view that the .toolbar modifier is attached to, that reproduces this issue? Or do you have a small test project demonstrating it? If so, please share a link to your test project. This will help us better understand what's going on. If you're not familiar with preparing a test project, take a look at
Creating a test project.
Thank you for your patience,
Richard Yeh Developer Technical Support