Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing scrollview offset when hiding keyboard

  • Loading branch information...
commit 5df728b2b207192b3bc3f9c6908e356990951199 1 parent c15d60a
@jgimenez jgimenez authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  TPKeyboardAvoidingScrollView.m
View
1  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

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...

@bkcbi

I totally agree.

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