How do I remove empty cells in table view? iOS Swift
问题 My table view currently looks like this: Note: I have blurred out actually names. I import a json file and retrive names from it. The names appear on the table view. In my ViewController I return an empty cell if the location field is nil in the json file. How do I remove the empty cells? I have tried tableView.tableFooterView = UIView() But that does not work Here is my ViewController class: import UIKit class ViewController: UITableViewController, UITableViewDataSource, UITableViewDelegate,