Shmidt Shmidt - 5 months ago 34
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

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)

Comments