-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid crash caused by deallocing parent during scroll
Closes #68
- Loading branch information
1 parent
522ba84
commit cb424fa
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cb424fa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still crash :(
(void)TPKeyboardAvoiding_initializeView:(UIView_)view {
if ( [view isKindOfClass:[UITextField class]] /// here it crashes
&& ((UITextField_)view).returnKeyType == UIReturnKeyDefault
&& (![(UITextField_)view delegate] || [(UITextField_)view delegate] == (id)self) ) {
[(UITextField*)view setDelegate:(id)self];
UIView *otherView = nil;
CGFloat minY = CGFLOAT_MAX;
[self TPKeyboardAvoiding_findTextFieldAfterTextField:view beneathView:self minY:&minY foundView:&otherView];
}
}