File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ - (void)TPKeyboardAvoiding_keyboardWillShow:(NSNotification*)notification {
5959
6060 UIView *firstResponder = [self TPKeyboardAvoiding_findFirstResponderBeneathView: self ];
6161
62- if (!firstResponder) {
62+ if ( !firstResponder ) {
6363 return ;
6464 }
6565
@@ -88,13 +88,11 @@ - (void)TPKeyboardAvoiding_keyboardWillShow:(NSNotification*)notification {
8888
8989 self.contentInset = [self TPKeyboardAvoiding_contentInsetForKeyboard ];
9090
91- if ( firstResponder ) {
92- CGFloat viewableHeight = self.bounds .size .height - self.contentInset .top - self.contentInset .bottom ;
93- [self setContentOffset: CGPointMake (self .contentOffset.x,
94- [self TPKeyboardAvoiding_idealOffsetForView: firstResponder
95- withViewingAreaHeight: viewableHeight])
96- animated: NO ];
97- }
91+ CGFloat viewableHeight = self.bounds .size .height - self.contentInset .top - self.contentInset .bottom ;
92+ [self setContentOffset: CGPointMake (self .contentOffset.x,
93+ [self TPKeyboardAvoiding_idealOffsetForView: firstResponder
94+ withViewingAreaHeight: viewableHeight])
95+ animated: NO ];
9896
9997 self.scrollIndicatorInsets = self.contentInset ;
10098
You can’t perform that action at this time.
0 commit comments