Skip to content

Commit 24d498a

Browse files
committed
- Fixed a compilation issue
- Updated Xcode version in travis.yml
1 parent c861956 commit 24d498a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ matrix:
55
only:
66
- master
77
os: osx
8-
osx_image: xcode10.1
8+
osx_image: xcode10.2
99
xcode_workspace: Demo.xcworkspace
1010
xcode_project: Demo.xcodeproj
1111
xcode_scheme: DemoObjC
@@ -22,7 +22,7 @@ matrix:
2222
only:
2323
- master
2424
os: osx
25-
osx_image: xcode10.1
25+
osx_image: xcode10.2
2626
xcode_workspace: Demo.xcworkspace
2727
xcode_project: Demo.xcodeproj
2828
xcode_scheme: DemoSwift

IQKeyboardManager/IQKeyboardManager.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#import <UIKit/UITouch.h>
5151
#import <UIKit/UIWindow.h>
5252
#import <UIKit/NSLayoutConstraint.h>
53+
#import <UIKit/UIStackView.h>
5354

5455
NSInteger const kIQDoneButtonToolbarTag = -1002;
5556
NSInteger 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

Comments
 (0)