I want to have a table with custom
UITableViewCell class as rows. Within each row (custom
UITableViewCell), I have a control which the user can use to change the state of something in that row.
Let's say for sake of an example that each table row (custom
UITableViewCell) contains a button and a label, and I want the clicking of the button to change the label text from "activated" to "deactivated" back and forth.
*NOTE** I understand that for the above scenario I can use the
didSelectRowAtIndexPath method to implement, but this doesn't work for my actual use scenario. I used the above scenario because its simpler, and includes the core functionality I need.
Normally if this were not in a
UITableViewCell, I would have a button with an
IBAction to the
UIViewController custom class, and an
IBOutlet to a label. The
IBAction method would change the text of the
IBOutlet label. Pretty standard stuff.
But with the control embedded in a table row, I cannot make
IBAction connections. I've tried making
IBAction connections to the
UIViewController as well as the
UITableViewCell, but it doesn't seem to allow it. How should I go about setting this up? It seems to me like a pretty useful thing to do in interface design, so I think it should be possible right?