I want to show 2 List side by side, by wrapping up both the Lists in HStack with SwiftUI framework.
BUT NavigationView is not collapsing while left side of List will scroll.
struct ContentView: View {
var body: some View {
NavigationView {
HStack(spacing: 0) {
List(0..<21) { _ in
Text("Hello, world!").padding()
}
List(0..<21) { _ in
Text("Hello, world!").padding()
}
}
.navigationTitle("Home")
//Added just to see navigation bar items
.navigationBarItems(leading: Button("Edit") {}, trailing: Button("Done") {})
}
}
}
How can I collapse NavigationView while scrolling left List?
