Remove extra line separators below List in SwiftUI

后端 未结 10 1929
予麋鹿
予麋鹿 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:39

    Here's one way.

    List {
             Section(footer: Text(""))) {
                    Text("One")
                    Text("Two")
                    Text("Three")
                }
         }
    

    Instead of the Text view in the footer, you can create your own. Note -I tried EmptyView() but that doesn't actually remove the redundant separators.

提交回复
热议问题