在UITextView末尾的省略号 [英] Ellipsis at the end of UITextView
本文介绍了在UITextView末尾的省略号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有多行不可滚动的UITextView,其文本长度超出可见区域,那么文本就像这样切断:
If I have multi-line non-scrollable UITextView whose text is longer than can fit in the visible area, then the text just cuts off like so:
Congress shall make no law respecting
an establishment of religion, or
如何以文本截止的省略号显示文本,如此
How would I get the text to show with an ellipsis where the text cut-off is, like so
Congress shall make no law respecting
an establishment of religion, or …
其他控件如标签和按钮有这种能力。
Other controls like labels and buttons have this ability.
推荐答案
为什么不使用 UILabel
设置 numberOfLines
适当的东西并免费获得该功能?
Why not use a UILabel
setting numberOfLines
to something appropriate and getting that functionality for free?
这篇关于在UITextView末尾的省略号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文