Skip to content

Commit 7a89fc7

Browse files
alexazhoumichaeltyson
authored andcommitted
add support for third-party keyboard(fix #148)
1 parent 351474d commit 7a89fc7

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

TPKeyboardAvoiding/UIScrollView+TPKeyboardAvoidingAdditions.m

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,15 @@ - (void)TPKeyboardAvoiding_keyboardWillShow:(NSNotification*)notification {
6161

6262
state.keyboardRect = keyboardRect;
6363
state.keyboardVisible = YES;
64-
state.priorInset = self.contentInset;
65-
state.priorScrollIndicatorInsets = self.scrollIndicatorInsets;
6664

67-
state.priorPagingEnabled = self.pagingEnabled;
65+
if ( !state.keyboardVisible ) {
66+
state.priorInset = self.contentInset;
67+
state.priorScrollIndicatorInsets = self.scrollIndicatorInsets;
68+
state.priorPagingEnabled = self.pagingEnabled;
69+
}
70+
6871
self.pagingEnabled = NO;
69-
72+
7073
if ( [self isKindOfClass:[TPKeyboardAvoidingScrollView class]] ) {
7174
state.priorContentSize = self.contentSize;
7275

0 commit comments

Comments
 (0)