When using [NSString boundingRectWithSize:options:attributes] the size of the rect that is returned is taller than I would expect for certain strings. The height re
[NSString boundingRectWithSize:options:attributes]
I tried the boundingRectWithSize function, but it didn't work for me.
boundingRectWithSize
What did work was sizeThatFits
sizeThatFits
Usage:
CGSize maxSize = CGSizeMake(myLabel.frame.size.width, CGFLOAT_MAX) CGSize size = [myLabel sizeThatFits:maxSize];