Maybe you just need to add translucency settings in your SwiftUI view
init() {
UINavigationBar.appearance().isTranslucent = true
}
alternate is to reset appearance completely, like
init() {
let appearance = UINavigationBarAppearance()
appearance.configureWithTransparentBackground()
appearance.backgroundColor = UIColor.systemBackground.withAlphaComponent(0.5)
UINavigationBar.appearance().standardAppearance = appearance
}
Demo prepared and tested with Xcode 12 / iOS 14
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…