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
Hiding an empty cells in Swift
Swift 3 Edition
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.tableView.tableFooterView = UIView(frame: CGRect.zero)
}
Swift 2 Edition
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
self.tableView.tableFooterView = UIView(frame: CGRectZero)
}