Remove extra line separators below List in SwiftUI

后端 未结 10 1899
予麋鹿
予麋鹿 2020-12-13 00:25

I\'ve created a simple List as below, but there are extra separators below it.

List {
  Text(\"Item 1\")
  Text(\"Item 2\")
  Text(\"Item 3\")
         


        
10条回答
  •  情书的邮戳
    2020-12-13 00:59

    It's not a perfect solution, but you could use a ScrollView, where each cell is created using a ForEach call, and the dividers are created using Divider().

    Edit: I spoke with Apple engineers at WWDC about this. They have heard lots of feedback regarding removing/changing dividers. However, for now my above answer is their recommendation.

提交回复
热议问题