When using [NSString boundingRectWithSize:options:attributes] the size of the rect that is returned is taller than I would expect for certain strings. The height re
[NSString boundingRectWithSize:options:attributes]
Swift 3+ solution based on omz's answer:
let string: NSString = "test" let maxSize = NSSize(width: CGFloat.greatestFiniteMagnitude, height: .greatestFiniteMagnitude) let boundingRect = string.boundingRect(with: maxSize, options: .usesDeviceMetrics, attributes: )