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?
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?
Set the label's lineBreakMode
to .ByClipping
(Swift) or NSLineBreakByClipping
(Objective-C).
I have achieved by following steps:
1.Increase height of label as I did so that 2 lines fit.
2.select label, go to attributes inspector
3.select Line Breaks
= Word Wrap
4.also increase lines, like 2,3
changing line break in attributes inspector
Worked for me
If you don't want to fit the size or show the three dots, you need to set your label like this.
Objective-C
[label setLineBreakMode: NSLineBreakByClipping];
Swift
label.lineBreakMode = .byClipping
© 2022 - 2024 — McMap. All rights reserved.