I have a table view in my iOS app that should only show five rows. However, under the five rows, it shows a lot of empty rows that continue to the bottom of the screen. I am using dynamic prototypes and I would like to know how to change the total number of rows programmatically. I thought that this function built in would work:
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return users.count
}
but it still adds empty cells below the last content cell.