I'm using an UITableView to display cells that can contain a certain amount of text. This amount can vary depending on the dynamic cell. Because I have 2 UILabel, I'm not sure what is the best way to achieve the cell height calculation.
Here are the conditions:
- UILabel *title = a label that can have from 1 to 4 lines
- UILabel *subtitle = a label that can have from 0 to 2 lines (font is smaller than *title)
- title + subtitle should be centered vertically (occurs when *subtitle have 0 line)
Do I have to create 2 dummies UILabel, fill them with cell contents, sizeToFit them adin finally get their height? Or is there an other, smarter, way to do that?
big thanks.