File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,6 @@ typedef void (^DAKeyboardDidMoveBlock)(CGRect keyboardFrameInView);
2121
2222- (CGRect)keyboardFrameInView ;
2323
24+ - (void )hideKeyboard ;
25+
2426@end
Original file line number Diff line number Diff line change @@ -154,6 +154,13 @@ - (void)removeKeyboardControl
154154 self.keyboardPanRecognizer = nil ;
155155}
156156
157+ - (void )hideKeyboard
158+ {
159+ self.keyboardActiveView .hidden = YES ;
160+ self.keyboardActiveView .userInteractionEnabled = NO ;
161+ [self .keyboardActiveInput resignFirstResponder ];
162+ }
163+
157164#pragma mark - Input Notifications
158165
159166- (void )responderDidBecomeActive : (NSNotification *)notification
@@ -364,9 +371,7 @@ - (void)panGestureDidChange:(UIPanGestureRecognizer *)gesture
364371 completion: ^(BOOL finished){
365372 if (!within44Pixels)
366373 {
367- self.keyboardActiveView .hidden = YES ;
368- self.keyboardActiveView .userInteractionEnabled = NO ;
369- [self .keyboardActiveInput resignFirstResponder ];
374+ [self hideKeyboard ];
370375 }
371376 }];
372377 }
@@ -392,9 +397,7 @@ - (void)panGestureDidChange:(UIPanGestureRecognizer *)gesture
392397 completion: ^(BOOL finished){
393398 if (!within44Pixels)
394399 {
395- self.keyboardActiveView .hidden = YES ;
396- self.keyboardActiveView .userInteractionEnabled = NO ;
397- [self .keyboardActiveInput resignFirstResponder ];
400+ [self hideKeyboard ];
398401 }
399402 }];
400403 }
You can’t perform that action at this time.
0 commit comments