File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,8 +264,10 @@ -(CGFloat)TPKeyboardAvoiding_idealOffsetForView:(UIView *)view withViewingAreaHe
264264}
265265
266266- (void )TPKeyboardAvoiding_initializeView : (UIView*)view {
267- if ( [view isKindOfClass: [UITextField class ]] && ((UITextField*)view).returnKeyType == UIReturnKeyDefault && (![(id )view delegate ] || [(id )view delegate ] == self) ) {
268- [(id )view setDelegate: self ];
267+ if ( [view isKindOfClass: [UITextField class ]]
268+ && ((UITextField*)view).returnKeyType == UIReturnKeyDefault
269+ && (![(UITextField*)view delegate ] || [(UITextField*)view delegate ] == (id <UITextFieldDelegate>)self) ) {
270+ [(UITextField*)view setDelegate: (id <UITextFieldDelegate>)self ];
269271 UIView *otherView = nil ;
270272 CGFloat minY = CGFLOAT_MAX;
271273 [self TPKeyboardAvoiding_findTextFieldAfterTextField: view beneathView: self minY: &minY foundView: &otherView];
You can’t perform that action at this time.
0 commit comments