How should I set up UITableViewCell subclasses with UIControls in them?
Posted
by
GeneralMike
on Stack Overflow
See other posts from Stack Overflow
or by GeneralMike
Published on 2012-12-05T17:45:11Z
Indexed on
2012/12/06
17:05 UTC
Read the original article
Hit count: 119
I have a dynamically generated UITableView (so I have to use prototype cells, not static cells) with many cells on it. Each cell will have a UILabel on it. Additionally, each cell will also have at least one UIControl (as of right now, it could be a UITextfield or a UISegmentedControl, but I want to keep it flexible in case I add something else in the future). I'm going to need to be able to send the text in that label, and get either the text in the textfield, or the title of the selected segment index, etc. For the cells with multiple controls, I'm going to have to also let it know what control I'm interested in for that call. What would be the best way to set this up?
© Stack Overflow or respective owner