0

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.

Ahsan
  • 827
  • 6
  • 10

1 Answers1

1

You can try this

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

Using snippet given above you can adjust the content size of UITextView

Enjoy Programming!!

Niru Mukund Shah
  • 4,637
  • 2
  • 20
  • 34