Reputation:
I have a table view that show lots of cells (I made it with a storyboard), and in other view there is a switch, I want that when this switch is turned off, the cell that it represents disappears from the table view, the view with the switch is connected to the tableview by a tab bar.
How do I do it? I don't have idea!
Upvotes: 0
Views: 85
Reputation: 3638
When the switch is turned off, call [tableView reloadData]
and in your tableView:numberOfRowsInSection:
check the switch's property to see whether it is turned off. If turned off, return 0.
Upvotes: 1