I am making a an app that has a UITextView and a button.
When I click the button some text will add in the UITextView.
But when c
You have to implement a delegate method. The code below checks whether a newline has been entered and, if so, scrolls to the bottom of the textView:
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
if ([text isEqualToString:@"\n"]) {
textView.contentOffset = CGPointMake(0.0, textView.contentSize.height);
}
return YES;
}