From 6a0c5ec7c8921eacb31d305e29aef66b83793dbf Mon Sep 17 00:00:00 2001 From: Nick Manning Date: Mon, 1 Dec 2014 15:56:44 -0500 Subject: [PATCH] Moved call to growingTextViewDidChange out of 'refreshHeight' --- class/HPGrowingTextView.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/class/HPGrowingTextView.m b/class/HPGrowingTextView.m index 9871c6f..5c64ae8 100644 --- a/class/HPGrowingTextView.m +++ b/class/HPGrowingTextView.m @@ -254,6 +254,11 @@ - (void)setPlaceholderColor:(UIColor *)placeholderColor - (void)textViewDidChange:(UITextView *)textView { [self refreshHeight]; + + // Tell the delegate that the text view changed + if ([delegate respondsToSelector:@selector(growingTextViewDidChange:)]) { + [delegate growingTextViewDidChange:self]; + } } - (void)refreshHeight @@ -340,10 +345,6 @@ - (void)refreshHeight [self performSelector:@selector(resetScrollPositionForIOS7) withObject:nil afterDelay:0.1f]; } - // Tell the delegate that the text view changed - if ([delegate respondsToSelector:@selector(growingTextViewDidChange:)]) { - [delegate growingTextViewDidChange:self]; - } } // Code from apple developer forum - @Steve Krulewitz, @Mark Marszal, @Eric Silverberg