Created
July 28, 2014 20:11
-
-
Save jeffbailey/5683fc5441c91377bb73 to your computer and use it in GitHub Desktop.
Multiline UILabel in Interface Builder
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
// The first two lines can be set in Interface builder | |
self.titleLabel.numberOfLines = 0; | |
self.titleLabel.lineBreakMode:NSLineBreakByWordWrapping; | |
[self.titleLabel setPreferredMaxLayoutWidth:self.frame.size.width-50]; | |
// Also in IB, set a constraint on the label so the height it >= the height of a single line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment