Shmidt Shmidt - 2 years ago 137
iOS Question

UITableView set to static cells. Is it possible to hide some of the cells programmatically?

UITableView
set to static cells.

Is it possible to hide some of the cells programmatically?

Answer Source

You are looking for this solution :

StaticDataTableViewController 2.0

https://github.com/xelvenone/StaticDataTableViewController

which can show/hide/reload any static cell(s) with or without animation!

[self cell:self.outletToMyStaticCell1 setHidden:hide]; 
[self cell:self.outletToMyStaticCell2 setHidden:hide]; 
[self reloadDataAnimated:YES];

Note to always use only (reloadDataAnimated:YES/NO) (dont call [self.tableView reloadData] directly)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download