iOS,如何在UITextView中进行单词剪切换行模式

时间:2013-09-20 11:27:33

标签: uitextview word-wrap

起初我认为这很容易,但我找不到办法。

我正在制作一个UITextView来显示一些文字内容,有些作品很长。所以默认情况下,textView.textAlignment,一些行留空,因为下一个单词很长。像这样:

I'm typing some words here
to explain long word 
willcause big blank
because in UITextView. It
makes some line left big
blank.

我想要的是剪切字断线,它是一种非常古老的风格,但我仍然想要它,就像这样:

I'm typing some words here
to explain long word will-
cause big blank because in
UITextView. It makes some 
line left big blank. I wa-
nt the line break by word 
and just add '-' in the b-
reaking word.

起初我看到UILabel有lineBreakMode属性,但我发现UITextView根本没有它。我现在所做的是对textView.textAlignment使用NSTextAlignmentJustified,但它也会在单词之间造成很大的空白。

是否可以以'word-clipping'方式显示?

感谢。

0 个答案:

没有答案
相关问题