Is there a way to put a view in the list header without sections? The table views normally have a property called tableHeaderView which is a header for the whole table and has nothing to do with section headers.
I'm trying to have a list and be able to scroll it like tableHeaderView from UITableView.
struct MyView: View {
let myList: [String] = ["1", "2", "3"]
var body: some View {
VStack {
MyHeader()
List(myList, id: \.self) { element in
Text(element)
}
}
}
}