import SwiftUI
struct ContentView: View {
var body: some View {
NavigationStack {
Text("XX")
.toolbar {
ToolbarItem(placement: .bottomBar) {
Text("YY")
}
}
}
}
}
Here is an even simpler ContentView that demonstrates the same error.
This occurs for both iOS 26.4 and iPadOS 26.4
The output generated in the Xcode console is:
'UIKitToolbar' as a subview of UIHostingController.view is not supported and may result in a broken view hierarchy. Add your view above UIHostingController.view in a common superview or insert it into your SwiftUI content in a UIViewRepresentable instead.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: