I have UITableView with custom cells, which contain uilabels.
I am using it to show comments and it must have flexible height.
How can I do it?
I have code, which counting number of rows with help of uilabel.text length, but it is wrong way. Have you any ideas?
I have UITableView with custom cells, which contain uilabels. I am using it to
Share
Use UILabel with numberOfLines set to zero.
Then, for making sure that your label actually fits into the cell, get the dimensions from the NSString UIKit extension like this;
From the NSString reference;
sizeWithFont:constrainedToSize: