I got a simple question :
In a tableView, i’m displaying a list of customCells. These cells contain labels, SegmentedControllers….
The labels, segmentedController and other cells attributes are declared in a specific class.
How could I, in the class where the list it updated, detect if the segmented controller of the cells are modified? In this class, when I do something like :
if (cell.segmentedControl == 1) { DO MY THINGS }
…nothing ever happens.
Has anybody an advice? 🙂
First of all, I’m pretty sure you need to use
with regards to knowing when it’s been changed, use an IBAction connected to your cell class, set up a delegate on your view controller that will get a call back from the cell class when a cell control is clicked.
EDIT ———————–
In your cell’s class .h add
In the cell’s class .m
In your ViewController that has the table, in the
cellForRowAtIndexPathmethod, addand add the method