Ellipsis at the end of UITextView

后端 未结 3 2072
无人共我
无人共我 2021-02-09 02:19

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         


        
3条回答
  •  伪装坚强ぢ
    2021-02-09 02:57

    Someone just showed me that it's actually really easy to do this with UITextView on iOS 7 and up:

    UITextView *textView = [UITextView new];
    textView.textContainer.lineBreakMode = NSLineBreakByTruncatingTail;
    

提交回复
热议问题