Skip to content

Commit

Permalink
framework updated
Browse files Browse the repository at this point in the history
  • Loading branch information
hackiftekhar committed Sep 15, 2014
1 parent 4382029 commit 89abef1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
23 changes: 12 additions & 11 deletions IQKeyBoardManager/IQKeyboardManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -310,19 +310,20 @@ -(void)setRootViewFrame:(CGRect)frame
// Getting topMost ViewController.
UIViewController *controller = [[self keyWindow] topMostController];

frame.size = controller.view.size;

if (IQ_IS_IOS8_OR_GREATER)
{
// If can't get rootViewController then printing warning to user.
if (controller == nil) NSLog(@"%@",IQLocalizedString(@"You must set UIWindow.rootViewController in your AppDelegate to work with IQKeyboardManager", nil));

//Used UIViewAnimationOptionBeginFromCurrentState to minimize strange animations.
[UIView animateWithDuration:animationDuration delay:0 options:(animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{
// Setting it's new frame
[controller.view setFrame:frame];
} completion:^(BOOL finished) {
}];
frame.size = controller.view.size;
}

// If can't get rootViewController then printing warning to user.
if (controller == nil) NSLog(@"%@",IQLocalizedString(@"You must set UIWindow.rootViewController in your AppDelegate to work with IQKeyboardManager", nil));

//Used UIViewAnimationOptionBeginFromCurrentState to minimize strange animations.
[UIView animateWithDuration:animationDuration delay:0 options:(animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{
// Setting it's new frame
[controller.view setFrame:frame];
} completion:^(BOOL finished) {
}];
}

/* UIKeyboard Did show. Adjusting RootViewController's frame according to device orientation. */
Expand Down
3 changes: 2 additions & 1 deletion IQKeyBoardManager/IQKeyboardReturnKeyHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
#import <Foundation/NSObject.h>
#import "IQKeyboardManagerConstants.h"

#import <UIKit/UITextInputTraits.h>
#import <UIKit/UITextField.h>
#import <UIKit/UITextView.h>

@class UITextField,UIView, UIViewController;

Expand Down
Binary file not shown.

0 comments on commit 89abef1

Please sign in to comment.