Swiftui List Row Cells set padding after View appears

后端 未结 4 1544
醉梦人生
醉梦人生 2021-02-15 12:28

I have a standard List only with one Text and on the right side the arrow for navigation. But after the list is loading and appeared at Screen, the list addapt the cells I think

4条回答
  •  名媛妹妹
    2021-02-15 13:04

    List
    {
       ForEach(items)
       {(item) in
          NavigationLink(destination:Destination())
          {
           Text("example")
          }
       }
    }.listStyle(InsetListStyle())
    

    The .listStyle(InsetListStyle()) helped me to solve the problem in XCode12.

提交回复
热议问题