How to remove new List padding that appeared on iOS14?

Ever since updating to iOS 14, I get additional padding in my List that I didn't see on iOS 13. I also see this on my Form.

Is this a known issue of iOS 14 ? How can I fix this ?

Code Block swift
var body: some View {
NavigationView {
VStack(alignment: .leading){
List {
// Content goes here
// Mostly text and buttons
}
}.navigationBarTitle(Text("settings.title"), displayMode: .inline)
}
}


I can't attach a screenshot or link to a service displaying images on this forum, but you can see the visual result here: https://stackoverflow.com/questions/64168107/how-to-remove-new-list-padding-that-appeared-on-ios14

Accepted Reply

I believe you can control this via explicitly specifying a plain list style

Example:

Code Block swift
var body: some View {
NavigationView {
VStack(alignment: .leading) {
List {
// ...
}.listStyle(PlainListStyle())
}.navigationBarTitle(Text("settings.title"), displayMode: .inline)
}
}

Replies

I believe you can control this via explicitly specifying a plain list style

Example:

Code Block swift
var body: some View {
NavigationView {
VStack(alignment: .leading) {
List {
// ...
}.listStyle(PlainListStyle())
}.navigationBarTitle(Text("settings.title"), displayMode: .inline)
}
}