How to limit max width of UILabel?
If you are using constraints then remove all constraints from you label.
Then again set frames of your label and if you want to make multiline label, then simply set the number of lines from 1 to 0 and increase the height of your label.
OR
If you want to fit your text within the label.You can simply enable Autoshrink property.
Give the label a <= constraint like this:
use following code
and set your width
in boundingRectWithSize
value.
CGSize itemTextSize = [@"Your Text" boundingRectWithSize:CGSizeMake(100, 30) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont fontWithName:@"Helvetica Neue" size:12.5]} context:nil].size;