I have a 'master' UITableView, in which I use different cells that are loaded from .xib's. Some of these cells themselves also have a UITableView.
For now I have set the row height of each cell to the original xib size. However, I would like to have the height dynamic and corresponding to the amount of rows in the 'child' UITableView.
I run into the following problem:
- Upon ViewController load, the master UITableView needs to have a height for every cell it has.
- By the time this height is needed, the child UITableView hasn't loaded its own cells yet, and therefore is not the proper size yet.
I have tried the following:
- At first, load the cell's with a 'estimated' height
- The cell loads its own tableView and calls to refresh the master tableView
However, in this case, the cell will use the 'estimated' height to lay out its own rows. Therefore it is always too big or too small.
How do I solve this problem?