Skip to content
Browse files

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

…n delegate
  • Loading branch information...
1 parent 6ac20a7 commit b24b085068b87b4272cfa5eb1f878781bfeb165c @hboon committed Feb 12, 2013
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:)]) {

0 comments on commit b24b085

Please sign in to comment.
Something went wrong with that request. Please try again.