Reputation: 3768
how can i limit the number of characters in a label
Upvotes: 0
Views: 360
Reputation: 163258
You can truncate the text with an ellipsis automatically by setting the frame
of the UILabel
.
NSInteger newSize = 10;
label.frame = CGRectMake(label.frame.origin.x, label.frame.origin.y, label.frame.size.height, newSize);
Upvotes: 1