File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ @interface TPKeyboardAvoidingState : NSObject
2626@property (nonatomic , assign ) BOOL keyboardVisible;
2727@property (nonatomic , assign ) CGRect keyboardRect;
2828@property (nonatomic , assign ) CGSize priorContentSize;
29+
30+
31+ @property (nonatomic ) BOOL priorPagingEnabled;
2932@end
3033
3134@implementation UIScrollView (TPKeyboardAvoidingAdditions)
@@ -61,6 +64,9 @@ - (void)TPKeyboardAvoiding_keyboardWillShow:(NSNotification*)notification {
6164 state.priorInset = self.contentInset ;
6265 state.priorScrollIndicatorInsets = self.scrollIndicatorInsets ;
6366
67+ state.priorPagingEnabled = self.pagingEnabled ;
68+ self.pagingEnabled = NO ;
69+
6470 if ( [self isKindOfClass: [TPKeyboardAvoidingScrollView class ]] ) {
6571 state.priorContentSize = self.contentSize ;
6672
@@ -117,6 +123,7 @@ - (void)TPKeyboardAvoiding_keyboardWillHide:(NSNotification*)notification {
117123
118124 self.contentInset = state.priorInset ;
119125 self.scrollIndicatorInsets = state.priorScrollIndicatorInsets ;
126+ self.pagingEnabled = state.priorPagingEnabled ;
120127 [UIView commitAnimations ];
121128}
122129
You can’t perform that action at this time.
0 commit comments