You can use the method sizeWithFont:constrainedToSize:lineBreakMode:for NSString to determine the height of a block of text based on font and limited width. Then you would update the frame of your label so that it is large enough to cover the text.
CGSize textSize = [label.text sizeWithFont:label.font constrainedToSize:CGSizeMake(label.frame.size.width, MAXFLOAT) lineBreakMode:label.lineBreakMode];
label.frame = CGRectMake(20.0f, 20.0f, textSize.width, textSize.height);
source
share