In IPhone, the width of the contents of the table is 320 or 300, depending on the style. However, when the iPad is on stage, we started using tables in different widths in accordance with our design.
One of the problems is that in some cases we calculate the height of the cell according to its subtitle text size. The height of the text depends on the width of the content, and the height of the cell depends on the height of the text. If the width is 300 or 320, this is normal. But think that I am using a table view of a table with a size of 500 pixels, and there is no way to calculate the reduced width of the content. Due to this problem, we cannot calculate the height of the call depending on its contents.
The only place we can get information about the width of the contents of the cell is a subclass of the layoutsubview method. However, heightForRowAtIndexPath is called before the layoutSubview method, and we have no information about the width of the contents of the reduced cell.
So, we need a good way to calculate the true width of a grouped cell in a tableview style.
I will be happy for any help.
Thanks.
M Ali Kaliskan
source share