Search code examples
swiftuilabel

How to get the height of a UILabel in Swift?


I am a beginner in Swift and I am trying to get the height of a label. The label has multiple lines of text. I want to know the total height it occupies on the screen.


Solution

  • it's simple, just call

    label.bounds.size.height