My first post ever (so please be patient).
I am building a group UITableView. Each section is defined and stored in an object called TableViewSectionClass.
The rows is different section will use different sub-classes of UITableCell to make the rows in various sections display differently. I.e. One line in one section, two in another, two with an image in another.
How can I store the “UITableCell class type needed to create my particular kind of row cell” in my TableViewSectionClass?
You can store it in a property/ivar of type
Class; you retrieve the appropriate class object using theclassclass method, of course, something liketableViewSectionClass.tableCellClass = [MyUITableCellClass class].You can use this class object just as you would a bare class name when calling class methods such as alloc:
[[self.tableCellClass alloc] initWithStyle:... reuseIdentifier:[self.tableCellClass description]].