I would love add buttons that seem like chips to the navigation bar utilizing SwiftUI. Apple’s App Retailer Join app has this:

I attempted to realize this with the next code:
struct ContentView: View {
var physique: some View {
NavigationStack {
Record {
ForEach(0..<100) { index in
Textual content("Content material")
}
}
.navigationTitle("Demo")
.navigationBarTitleDisplayMode(.inline)
.safeAreaInset(edge: .prime) {
ScrollView(.horizontal) {
HStack {
ForEach(0..<5) { index in
Textual content("Textual content (index)")
.padding()
.glassEffect()
}
}
.padding(.horizontal)
}
}
}
}
}
Nevertheless it does not work as anticipated:

-
The chips have some bizarre background shade
-
Scrolling the record up makes it fade out beneath the navigation, however the chips aren’t taken into consideration
Is it doable to realize the identical impact as Apple’s Join app?

