uitableviewstatic-content

UITableView Static Cells - How to limit rows displayed?


On iOS 5

I Have a UITableViewController set to Static Cells. I only need 3 rows which will be filled with content for each row. So I put 3 UITableViewCell. All works fine but when I run the app, it always shows more than 3 rows. The rest of the rows is empty rows. How can I only display the 3 rows I intended to display.

Should I use Grouped style and custom the look?


Solution

  • set footerView to an empty view.

    self.tableView.tableFooterView = [UIView new].
    

    this works on dynamic cells. should work on static cells too.