In SwiftUI List Appears to have a property called ListStyle.
How can i change the style of the list
struct ListView : View {
As of Xcode 11 beta 5, Apple requires the following, as briefly outlined here:
.listStyle(GroupedListStyle())
The following is breakdown on the various styles and where they can be used between iOS and watchOS, along with when they were introduced.
Introduced with iOS 13 and watchOS 6:
PlainListStyle
ListStyle
DefaultListStyle
Introduced with iOS 13:
GroupedListStyleIntroduced with iOS 14:
InsetGroupedListStyleInsetListStyleSidebarListStyleSome answers to this question also include styles that are watchOS specific, but are not clearly marked as such, despite the question being tagged iOS. For completeness...
Introduced with watchOS 6:
CarouselListStyleIntroduced with watchOS 7:
EllipticalListStyle