I have some code:
CGRect currentFrame = textLabel.frame;
CGSize max = CGSizeMake(textLabel.frame.size.width, 3000);
CGSize expected = [[textLabel text] sizeWithF
When using AutoLayout you should not update the frame property, instead modify the contraints on a view.
On the other hand, you could also let AutoLayout work for you. Make sure the numberOfLines
property of the label is set to 0 and the height constraint is of type Greater Than or Equal
(>=). This way the layout will update automatically after setting new text on a label.