The question is simple, how can I prevent a Large Title Navigation Bar from collapse when a scrollview scrolls down?
My navigation must have a large navigation bar a
If someone arrives here from SwiftUI land, this is a good way to keep your lists in large title mode.
// your content view ...
var body: some View {
VStack {
PreventCollapseView()
List {
ForEach(things, id: \.self) { thing in
Text(thing.name)
}
}
}
.navigationBarTitle("All the things")
}
// end of view
struct PreventCollapseView: View {
private var mostlyClear = Color(UIColor(white: 0.0, alpha: 0.0005))
var body: some View {
Rectangle()
.fill(mostlyClear)
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: 1)
}
}