I have multiline attributed text in a UILabel that I would like to find the width of. The purpose of this is to resize the font size for different devices. To do this I check whether the text with line breaks will fit a given space. I have tried
Try this solution:
Here we get the size the entire
CGRect paragraphRect = [attributedText boundingRectWithSize:CGSizeMake(300.f, CGFLOAT_MAX) options:(NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading) context:nil];
You can then use it to find the width of the NSAttributedString Hope this helps you out.