Linux world
Linux world

Reputation: 3768

text size in label

how can i limit the number of characters in a label

Upvotes: 0

Views: 360

Answers (1)

Jacob Relkin
Jacob Relkin

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

Related Questions