Permalink
Browse files

fixing scrollview offset when hiding keyboard

  • Loading branch information...
1 parent c15d60a commit 5df728b2b207192b3bc3f9c6908e356990951199 @jgimenez jgimenez committed Oct 3, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 TPKeyboardAvoidingScrollView.m
@@ -112,6 +112,7 @@ - (void)keyboardWillHide:(NSNotification*)notification {
[UIView setAnimationCurve:[[[notification userInfo] objectForKey:UIKeyboardAnimationCurveUserInfoKey] intValue]];
[UIView setAnimationDuration:[[[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] floatValue]];
self.contentInset = _priorInset;
+ self.contentOffset = CGPointZero;
[self setScrollIndicatorInsets:self.contentInset];
_priorInsetSaved = NO;
[UIView commitAnimations];

2 comments on commit 5df728b

@jfradj
jfradj commented on 5df728b Jan 22, 2013

I think you should not set the Offset to Zero.
It's really weird/not user friendly to always reset the offset when the user already scroll to a specific position...

@throll
throll commented on 5df728b Mar 1, 2013

I totally agree.

Please sign in to comment.