How to remove extra empty cells in TableViewController, iOS - Swift

后端 未结 13 1036
暗喜
暗喜 2020-12-22 16:12

Hi I have a TableViewController with two static cells, however when displayed, it shows the two static cells, and then all the other empty cells for the tablevi

13条回答
  •  情话喂你
    2020-12-22 16:29

    Abobe anwer is right. We can achieve this by adding

    tableView.tableFooterView = UIView() // to remove extra cells in tableView
    

提交回复
热议问题