Question : list header swiftui
Answered by : quaint-quail-rblyi6q3wthz
struct MyHeader: View { var body: some View { Text("Header") }
}
struct DemoTableHeader: View { let myList: [String] = ["1", "2", "3"] var body: some View { List { MyHeader() ForEach(myList, id: \.self) { element in Text(element) } } }
}
Source : https://stackoverflow.com/questions/63037472/swiftui-main-list-scrollable-header-view-without-sections | Last Update : Wed, 27 Jan 21