I am trying to make a textView frame scale horizontally as text accumulates. I am using the code blow to try to make this happen. The frame scales vertically as expected, but the size seems to be locked horizontally.
[myTextView setFrame:CGRectMake(myTextView.frame.origin.x, myTextView.frame.origin.y, myTextView.contentSize.width, myTextView.contentSize.height)];
Here is the project (27K) if anyone wants to take a look.
Thanks for reading.
Implement UITextView delegate in .h file this:
If yourTextView added from xib then bind delegate with fileowner otherwise in ViewDidLoad add this line:
Use textView’s delegate for your requirement: