I have a very simple question that I can't (for the life of me) figure out. I know I'm going to smack myself when I hear the answer.
I have a UITableView, and on it, UITableViewCell subclasses. Each cell has a UIButton subview.
I need the button on each cell to be disabled if a boolean value is false; the button should be enabled if/when the boolean value changes to true. I will observe KVC. Where should I have the handler for this? In the UIViewController? If so, what is the best way to tell the cells that they need to disable/enable the button?
I would implement the show/hide functionality in cellForRowAtIndexPath, and call [tableView reloadData] (or a more specific reload/refresh call) when a change to the boolean value was made.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With