How do you return a multiline text CGSize from the new iOS 7 method sizeWithAttributes?
I would like this to produce the same results as sizeWithFont:constrainedToSi
Here's my method to deal with both situations, goes in an NSString category.
- (CGSize) sizeWithFontOrAttributes:(UIFont *) font {
if (IS_IOS7) {
NSDictionary *fontWithAttributes = @{NSFontAttributeName:font};
return [self sizeWithAttributes:fontWithAttributes];
} else {
return [self sizeWithFont:font];
}
}