Please reopen, I've found a solution. None of the links provided target this question.
I've tried removing Navigation bar of the List, pushing VStack to top, I don't know what else could it be...
How do I remove all that extra space?
struct Ocean: Identifiable, Hashable {
let name: String
let id = UUID()
}
var oceans = [
Ocean(name: "A"),
Ocean(name: "B"),
Ocean(name: "C"),
Ocean(name: "D"),
Ocean(name: "E")
]
@State var multiSelection = Set<UUID>()
var body: some View {
NavigationView {
VStack {
Divider()
Text("some text")
List(oceans, selection: $multiSelection) {
Text($0.name)
}
Text("some text2")
Spacer()
}
}
}
}
EDIT: Please reopen the question, none of the links provided answer it and I've found the solution, need to post it.