How to change truncate characters in UILabel?

前端 未结 5 700
野趣味
野趣味 2020-12-03 19:31

When the text of a UILabel gets truncated there are 3 dots inserted by default. Is it possible to change these characters or disable them?

5条回答
  •  我在风中等你
    2020-12-03 20:31

    Look at -[UILabel setLineBreakMode:] and UILineBreakModeCharacterWrap. The default value of -[UILabel lineBreakMode] is UILineBreakModeTailTruncation, which causes the ellipsis at the end.

提交回复
热议问题