5050#import <UIKit/UITouch.h>
5151#import <UIKit/UIWindow.h>
5252#import <UIKit/NSLayoutConstraint.h>
53+ #import <UIKit/UIStackView.h>
5354
5455NSInteger const kIQDoneButtonToolbarTag = -1002;
5556NSInteger const kIQPreviousNextButtonToolbarTag = -1005;
@@ -629,7 +630,7 @@ -(void)adjustPosition
629630
630631 CGFloat keyboardDistanceFromTextField = (specialKeyboardDistanceFromTextField == kIQUseDefaultKeyboardDistance)?_keyboardDistanceFromTextField:specialKeyboardDistanceFromTextField;
631632
632- CGSize kbSize = _kbFrame.size ;
633+ CGSize kbSize;
633634
634635 {
635636 CGRect kbFrame = _kbFrame;
@@ -1324,10 +1325,12 @@ - (void)keyboardWillHide:(NSNotification*)aNotification
13241325 if (strongLastScrollView)
13251326 {
13261327 __weak typeof(self) weakSelf = self;
1328+ __weak typeof(UIView) *weakTextFieldView = self.textFieldView;
13271329
13281330 [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{
13291331
13301332 __strong typeof(self) strongSelf = weakSelf;
1333+ __strong typeof(UIView) *strongTextFieldView = weakTextFieldView;
13311334
13321335 if (UIEdgeInsetsEqualToEdgeInsets(strongLastScrollView.contentInset, strongSelf.startingContentInsets) == NO)
13331336 {
@@ -1348,7 +1351,7 @@ - (void)keyboardWillHide:(NSNotification*)aNotification
13481351 if (IQ_IS_IOS9_OR_GREATER)
13491352#endif
13501353 {
1351- animatedContentOffset = ([strongSelf.textFieldView superviewOfClassType:[UIStackView class] belowView:strongLastScrollView] != nil);
1354+ animatedContentOffset = ([strongTextFieldView superviewOfClassType:[UIStackView class] belowView:strongLastScrollView] != nil);
13521355 }
13531356
13541357 if (animatedContentOffset) {
0 commit comments