NSAttributedString
extension NSAttributedString
                This extension allows us to get the displayed height and width (given a full-sized canvas -so no wrapping or truncating) of an attributed string.
- 
                  
                  
Declaration
Swift
var stringHeight: CGFloat { get }Return Value
The height required to display the string, in display units.
 - 
                  
                  
Declaration
Swift
var stringWidth: CGFloat { get }Return Value
The width required to display the string, in display units.
 
            View on GitHub