In apple documentation:
sizeWithFont: Returns the size of the string if it were to be rendered with the specified font on a single line. (Deprecated in iOS 7.0. Use sizeWithAttributes: instead.)
- (CGSize)sizeWithFont:(UIFont *)font Parameters font The font to use for computing the string size. Return Value The width and height of the resulting string’s bounding box. These values may be rounded up to the nearest whole number.
So you can use sizeWithAttributes: like this:
CGSize sizeForText = [faqItem.answer sizeWithAttributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:14]}
constrainedToSize:CGSizeMake(self.tblView.bounds.size.width - padding, MAXFLOAT)
lineBreakMode:NSLineBreakByWordWrapping];
[sectionInfo insertObject:[NSNumber numberWithFloat:roundf(sizeForText.height + 5)]
inRowHeightsAtIndex:0];