Is there a problem with this solution for an expandable UITableCell?

Hey everyone!

I've got a UITableView and want to fill it with cells that expand to either show a UIlabel with some additional info or a UIImage when tapped. Googling shows mostly solutions for phone book like apps and they all use sections (one for each letter) and rows within that section (for the actual person entry).

How I solved it:
Create multiple prototype cells with one subclass of UITableViewCell for each, set some parameter in didSelectRowAt & reload the table load there too, then just pick the right prototype cell according to that parameter in cellForRowAt.

This seems like a pretty easy and straight forward way of doing this and yet I haven't come across anyone else doing it that way. Are there any performance problems doing it like this and that's why nobody is? What's the recommended way of doing this when the expanded part of your UITableViewCell doesn't look the same for every cell?
IMHO having several cell prototypes is a good way to go.

The only point is reloading the complete table. Why not just reload some cells ?
@Claude31
You're right, it's better to only reload the previous and the current row of course.
Do you know of another way to do what I described? As I said, I haven't come across anyone doing anything like this before (or even anything similar, apart from the phone book apps), which does seem a bit weird.
Do you know of another way to do what I described?

There are other ways, not sure they are better.
For instance:
  • create a single prototype

  • Have all the components (labels, …) you need for both types of cell

  • Hide / unHide specific components in cellForRowAt depending on type

  • In heightForRowAt, compute depending on type of cell

Is there a problem with this solution for an expandable UITableCell?
 
 
Q