- (void)viewDidLoad {
self.textView.contentSize = self.textView.frame.size;
}
Implement this delegate method in text form.
Now that the characters entered are greater than 23, we set the size of the contents of the text view to a larger value so that horizontal scrolling is turned on automatically.
- (void) textViewDidChange:(UITextView *) tView {
if (tView.text.length > 23) {
tView.contentSize = CGSizeMake(200.0f, tView.frame.size.height);
}
}
user745098
source
share