With what should I replace the deprecated sizeWithFont: method?
After an hour of trial error I managed to make it work: CGSize maximumLabelSize = CGSizeMake(tableView.width, MAXFLOAT); NSStringDrawingOptions options = NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin; NSDictionary *attr = @{NSFontAttributeName: [UIFont systemFontOfSize:15]}; CGRect labelBounds = [string boundingRectWithSize:maximumLabelSize options:options attributes:attr context:nil]; Update: As Mr. T mentions in answer below : In iOS 7 and later, this method returns fractional … Read more