Skip to content

Instantly share code, notes, and snippets.

@hollance
Created August 22, 2014 17:55
Show Gist options
  • Select an option

  • Save hollance/c0e1f84d2932ce39fed8 to your computer and use it in GitHub Desktop.

Select an option

Save hollance/c0e1f84d2932ce39fed8 to your computer and use it in GitHub Desktop.
Calculating height for a UILabel
var rect = CGRect(x: 100, y: 10, width: 205, height: 10000)
addressLabel.frame = rect
addressLabel.sizeToFit()
rect.size.height = addressLabel.frame.size.height
addressLabel.frame = rect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment