views:

41

answers:

0

I've been looking for this for a while, but haven't found an answer (blame poor googling skills). I have a custom UITableViewCell class which, currently, consists of a custom switch and a label. I want to add a button that's only visible (And active) when the switch is set to "Yes". Right now I add the switch to the accessory view, and leave it. However, the accessory view doesn't really have subviews, as far as I can tell, so here's my question:

Should I just create a UIView that has a button and a switch, size it to fit the cell's accessory view (or will it auto-size itself?), and put that in as the cell's accessory view? And is this typically the way that it's gone about?

Or is there a solution that I'm missing?

Thanks.