Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix: call -growingTextView:shouldChangeTextInRange:replacementText: i…

…n delegate
  • Loading branch information...
commit b24b085068b87b4272cfa5eb1f878781bfeb165c 1 parent 6ac20a7
@hboon authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 class/HPGrowingTextView.m
View
6 class/HPGrowingTextView.m
@@ -452,6 +452,12 @@ - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range
//weird 1 pixel bug when clicking backspace when textView is empty
if(![textView hasText] && [atext isEqualToString:@""]) return NO;
+
+ if ([delegate respondsToSelector:@selector(growingTextView:shouldChangeTextInRange:replacementText:)]) {
+ if (![delegate growingTextView:self shouldChangeTextInRange:range replacementText:atext]) {
+ return NO;
+ }
+ }
if ([atext isEqualToString:@"\n"]) {
if ([delegate respondsToSelector:@selector(growingTextViewShouldReturn:)]) {
Please sign in to comment.
Something went wrong with that request. Please try again.