Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to remove three dots from UILabel?

Tags:

ios

uilabel

I have a UILabel that contains text that is bigger than the label size. (The UILabel has 2 lines.)

The UILabel is showing the three dots (ellipsis) on iOS. I do not want label to show this dots. How can I make them not show?

like image 906
userInStackoverflow Avatar asked Jul 01 '15 09:07

userInStackoverflow


2 Answers

Set the label's lineBreakMode to .ByClipping(Swift) or NSLineBreakByClipping(Objective-C).

like image 177
Bannings Avatar answered Nov 12 '22 08:11

Bannings


Programmatically,

nameLabel.lineBreakMode = .byClipping

like image 45
C Williams Avatar answered Nov 12 '22 09:11

C Williams