In IPhone tableview content width is either 320 or 300 depending on the style. However when Ipad is on the stage, we started to use tableviews in different widths according to our design.
One problem is, in some cases we calculate the height of a cell according to its subtitle text size. The text height depends to the contentwidth, while the cell height depends on the text height. If the width is 300 or 320 it is ok. But think that I use a 500 pix wide grouped style tableview, and there is no way to calculate reduced content width. Because of this problem we can not calculate the height of the call depending to its content.
The only location where we can get an information about the contentwidth of the cell is a subclassed layoutsubview method. However the heightForRowAtIndexPath is called before layoutSubview method and we dont have the information about the content width of the reduced cell.
So we need a good way to calculate the true width of a grouped style tableview cell.
I will be glad for any help.
Thanks.
M Ali Caliskan