Very simple question, I'm trying to dynamically get the height of a UILabel, and it seems the boundingRectWithSize:options:context:
is ignoring my second line. I've pasted the relevant code below:
CGSize maximumLabelSize = CGSizeMake(self.frame.size.width,CGFLOAT_MAX);
return [self.attributedText boundingRectWithSize:maximumLabelSize options:NSStringDrawingUsesLineFragmentOrigin context:nil].size;
I think I'm setting it up right, however this returns 17 (after getting the height and rounding up) regardless of whether it is 1 or 2 lines. Any help would be appreciated!
Edit: When using NSStringDrawingUsesFontLeading it cuts my second line off completely.