Skip to content

Commit

Permalink
- Fixed a compilation issue
Browse files Browse the repository at this point in the history
- Updated Xcode version in travis.yml
  • Loading branch information
hackiftekhar committed May 1, 2019
1 parent c861956 commit 24d498a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ matrix:
only:
- master
os: osx
osx_image: xcode10.1
osx_image: xcode10.2
xcode_workspace: Demo.xcworkspace
xcode_project: Demo.xcodeproj
xcode_scheme: DemoObjC
Expand All @@ -22,7 +22,7 @@ matrix:
only:
- master
os: osx
osx_image: xcode10.1
osx_image: xcode10.2
xcode_workspace: Demo.xcworkspace
xcode_project: Demo.xcodeproj
xcode_scheme: DemoSwift
Expand Down
Binary file not shown.
7 changes: 5 additions & 2 deletions IQKeyboardManager/IQKeyboardManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#import <UIKit/UITouch.h>
#import <UIKit/UIWindow.h>
#import <UIKit/NSLayoutConstraint.h>
#import <UIKit/UIStackView.h>

NSInteger const kIQDoneButtonToolbarTag = -1002;
NSInteger const kIQPreviousNextButtonToolbarTag = -1005;
Expand Down Expand Up @@ -629,7 +630,7 @@ -(void)adjustPosition

CGFloat keyboardDistanceFromTextField = (specialKeyboardDistanceFromTextField == kIQUseDefaultKeyboardDistance)?_keyboardDistanceFromTextField:specialKeyboardDistanceFromTextField;

CGSize kbSize = _kbFrame.size;
CGSize kbSize;

{
CGRect kbFrame = _kbFrame;
Expand Down Expand Up @@ -1324,10 +1325,12 @@ - (void)keyboardWillHide:(NSNotification*)aNotification
if (strongLastScrollView)
{
__weak typeof(self) weakSelf = self;
__weak typeof(UIView) *weakTextFieldView = self.textFieldView;

[UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{

__strong typeof(self) strongSelf = weakSelf;
__strong typeof(UIView) *strongTextFieldView = weakTextFieldView;

if (UIEdgeInsetsEqualToEdgeInsets(strongLastScrollView.contentInset, strongSelf.startingContentInsets) == NO)
{
Expand All @@ -1348,7 +1351,7 @@ - (void)keyboardWillHide:(NSNotification*)aNotification
if (IQ_IS_IOS9_OR_GREATER)
#endif
{
animatedContentOffset = ([strongSelf.textFieldView superviewOfClassType:[UIStackView class] belowView:strongLastScrollView] != nil);
animatedContentOffset = ([strongTextFieldView superviewOfClassType:[UIStackView class] belowView:strongLastScrollView] != nil);
}

if (animatedContentOffset) {
Expand Down

0 comments on commit 24d498a

Please sign in to comment.