Created
August 22, 2014 17:55
-
-
Save hollance/c0e1f84d2932ce39fed8 to your computer and use it in GitHub Desktop.
Calculating height for a UILabel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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