Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 UITextView,当我在 5-6 行之后输入数据时,数据向上滚动并且看不到。当输入的文本超过高度时,是否有任何属性可以用来增加 UITextView 的高度。
请建议伙计们。
Use this code to make the height of the UITextView be the same as the height of the content inside it.
CGRect frame = _textView.frame; frame.size.height = _textView.contentSize.height; _textView.frame = frame;