I'm looking for the generally accepted/best solution to this problem.
Problem
I have a UITableViewController populated with UITableViewCell
objects that represent FooModel
objects. When a user taps on a row, I want to add one or more additional cells below that cell with additional controls. So the question is: what is the best way to manage model-cells and control-cells in the table? Keeping an array of UITableViewCell
objects defeats the purpose of dequeueReusableCellWithIdentifier:
(doesn't it?) because it must preserve all of the views in the whole table. So what should be in the array used to tell the data source what cells go at what indexes? Or is there a better solution?