Remove extra line separators below List in SwiftUI

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

    For unknown reason, I had this problem in tableView even after iOS14, even though the answer above that there will be no longer extra separator lines in default.

    The method I use to solve it is to set footerView to vacant UIView, as in that same answer.

    your_tableView.tableFooterView = UIView()
    

提交回复
热议问题