Skip to content

Instantly share code, notes, and snippets.

@NZKoz
Created September 22, 2013 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NZKoz/6655973 to your computer and use it in GitHub Desktop.
Save NZKoz/6655973 to your computer and use it in GitHub Desktop.
-(void) textViewDidChange:(UITextView *)textView {
[self updateBarButtonItemState];
[self _showTextViewCaretPosition:textView];
}
- (void)_showTextViewCaretPosition:(UITextView *)textView {
CGRect caretRect = [textView caretRectForPosition:self.textView.selectedTextRange.end];
[self.textView scrollRectToVisible:caretRect animated:NO];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment