Add more button at the end of text inside UITextView Objective-C?

后端 未结 2 920
天涯浪人
天涯浪人 2021-01-22 17:48

I am trying to do something similar to the one in this link http://www.oracle.com/webfolder/ux/mobile/pattern/img/expand-collpase-description.png

Expanding the content i

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-22 18:08

    I'm doing the same thing. Just add the button to textView.superView, because textView is scrollView. Use button's rect in textView as
    textView.textContainer.exclusionPaths = [UIBezierPath(rect: rect)]

    At last, I did it. Most important thing is rect must be included in textView.frame.

提交回复
热议问题