How to change ListStyle in List

后端 未结 3 997
你的背包
你的背包 2021-02-05 06:42

In SwiftUI List Appears to have a property called ListStyle.

How can i change the style of the list

struct ListView : View {         


        
3条回答
  •  佛祖请我去吃肉
    2021-02-05 06:57

    in Xcode 11.2.1, Right answer is in the below.

    .listStyle(GroupedListStyle())
    
    Conforming Types  ->
    CarouselListStyle
    DefaultListStyle
    GroupedListStyle
    PlainListStyle
    SidebarListStyle
    

    ref:https://developer.apple.com/documentation/swiftui/liststyle

提交回复
热议问题