-1

I have an fixed sizeTextView And I want to Autosize its Text e.g When I write

"This" The Text Size should be 70

"This is" The Text Size should be 60

"This is Table" The Text Size should be 40

Can Some One help me about This the size will be change depending on its text in Short Text size should be scale to Fit.

4

1 回答 1

1

你可以试试这个

CGRect frame = _textView.frame;
frame.size.height = _textView.contentSize.height;
_textView.frame = frame;

使用上面给出的代码片段,您可以调整 UITextView 的内容大小

享受编程!!

于 2013-03-07T10:06:10.883 回答