When using ScrollView the views inside it are spread across the whole screen width by default, but when using List, there is a padding on the sides. Is there a way to get rid of this padding?
For iOS 15.0+ , you may try listStyle
modifier and set it as plain
.
var body: some View {
List {
// some rows
}
.listStyle(.plain)
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.