Wednesday, November 30, 2022
HomeiOS Developmentios - Xcode 14 navigation bar whited out with UIHostingController

ios – Xcode 14 navigation bar whited out with UIHostingController


I’ve observed a bug launched when constructing with Xcode 14.
The navigation bar of my swiftui view is whited out and doesn’t correctly show the title, again button or different navigation objects.
I have never discovered anybody else reporting this challenge on-line however it’s clearly a change in how Xcode builds the app.

I’ve verified that constructing with Xcode 13.4.1 produces the anticipated navigation bar.

I manually downloaded 13.4.1 so as to proceed deploying builds with out this bug however I do know finally I should examine why Xcode 14 is inflicting this challenge. I am hoping there’s a repair that Apple discovers and releases to repair this challenge.

The navigation bar is programmatically set via a view controller utilizing a UIHostingController as its rootView.

I’ve discovered that this solely occurs when injecting swiftui right into a UIKit app utilizing UIHostingController. The SwiftUI view doesn’t use a NavigationView so there should not be any overlap between what’s displayed within the navigation bar from the viewController and what’s displayed from the SwiftUI view.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments