How to make a semi-transparent Navigation Bar in SwiftUI?
问题 I've seen several posts discussing how to make a transparent Navbar in SwiftUI, but none on how to make a semi-transparent one, which is surprising to me as its a very common patter on Apple's default apps. For example the Notes app: You can see the drawing through the NavBar. Anyone know how to do this, ideally in a way which works in light/dark mode? 回答1: Maybe you just need to add translucency settings in your SwiftUI view init() { UINavigationBar.appearance().isTranslucent = true }