I am using custom cell in UITableView
. There are 4 views in cell. 3 UILabel
s and 1 UIImageView
(grey colored one) as shown below. Text
I solved this after experimenting with lot of things. The only thing I had to do is to set horizontal and vertical content compression resistance priority to required.i.e. 1000. I did this for all labels because I don't want any of the labels to trim their content.
One more thing which is too much important is Getting Right Height Of Cell. If there is even 1pt of error in calculating custom cell's height it will not be displayed as expected.
Hint :
Yoy can test if height is wrong by adding/removing constant value to height (variable) you calculate for cell.