I am new to swiftui and using version 2 . I have a List which populates from the database . The issue I am struggling with is getting my List to start at the very top and eliminate padding . If you look at the image below you see a gray space between the top data "Places My circle" and the list . Any help on eliminating that gray space would be great . This is my code
struct MainView: View {
@State var model: [MainModel] = []
var body: some View {
VStack {
HStack {
Text("Places")
Text("My Circle | Location")
}
TimeLineView(model: $model) // List comes from here
}
}
}
struct TimeLineView: View {
@Binding var model: [MainModel]
var body: some View {
List {
ForEach(model) { value in
// Simple elements populated
}
}.listStyle(GroupedListStyle())
.padding(0)
}
}
