Calculating UILabel Text Size
All of the [NSString sizeWithFont…] methods are deprecated in iOS 7. Use this instead. CGRect labelRect = [text boundingRectWithSize:labelSize options:NSStringDrawingUsesLineFragmentOrigin attributes:@{ NSFontAttributeName : [UIFont systemFontOfSize:14] } context:nil]; Also see https://developer.apple.com/documentation/foundation/nsstring/1619914-sizewithfont. UPDATE – example of boundingRectWithSize output Per your comment I did a simple test. The code and output is below. // code to generate a … Read more