Hide empty cells in UITableView

后端 未结 7 907
春和景丽
春和景丽 2021-01-11 12:47

I have a searchable tableview, but would like to only display the number of cells that are returned once a user starts a search. For instance, if a user types in a charecter

7条回答
  •  北恋
    北恋 (楼主)
    2021-01-11 13:15

    For swift 2.x xCode 7 :

    override func viewDidLoad() {
            super.viewDidLoad()
            print("∙ \(NSStringFromClass(self.dynamicType))")
            ...
            self.tableView.tableFooterView = UIView()
    }
    

提交回复
热议问题