Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
hackiftekhar committed Jun 4, 2015
2 parents 6f29297 + 5d4d33f commit 9e70b52
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion IQKeyBoardManager/Categories/IQUIView+Hierarchy.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ -(UIViewController *)topMostController

UIViewController *topController = self.window.rootViewController;

[controllersHierarchy addObject:topController];
if (topController)
{
[controllersHierarchy addObject:topController];
}

while ([topController presentedViewController]) {

Expand Down
7 changes: 7 additions & 0 deletions IQKeyBoardManager/IQKeyboardManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,13 @@ -(void)textFieldViewDidBeginEditing:(NSNotification*)notification
[UIView animateWithDuration:0.00001 delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{
[self addToolbarIfRequired];
} completion:^(BOOL finished) {

//RestoringTextView before reloading inputViews
if (_keyboardManagerFlags.isTextFieldViewFrameChanged)
{
_keyboardManagerFlags.isTextFieldViewFrameChanged = NO;
_textFieldView.frame = _textFieldViewIntialFrame;
}

//On textView toolbar didn't appear on first time, so forcing textView to reload it's inputViews.
[_textFieldView reloadInputViews];
Expand Down
1 change: 1 addition & 0 deletions IQKeybordManagerSwift/Categories/IQNSArray+Sort.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// THE SOFTWARE.

import Foundation
import UIKit

/**
UIView.subviews sorting category.
Expand Down
4 changes: 2 additions & 2 deletions IQKeybordManagerSwift/IQKeyboardManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ class IQKeyboardManager: NSObject, UIGestureRecognizerDelegate {
self._IQShowLog("Set \(controller?._IQDescription()) frame to : \(frame)")

//Animating content if needed (Bug ID: #204)
if layoutIfNeededOnUpdate == true {
if self.layoutIfNeededOnUpdate == true {
//Animating content (Bug ID: #160)
unwrappedController.view.setNeedsLayout()
unwrappedController.view.layoutIfNeeded()
Expand Down Expand Up @@ -1339,7 +1339,7 @@ class IQKeyboardManager: NSObject, UIGestureRecognizerDelegate {
rootViewController.view.frame = self._topViewBeginRect

//Animating content if needed (Bug ID: #204)
if layoutIfNeededOnUpdate == true {
if self.layoutIfNeededOnUpdate == true {
//Animating content (Bug ID: #160)
rootViewController.view.setNeedsLayout()
rootViewController.view.layoutIfNeeded()
Expand Down

0 comments on commit 9e70b52

Please sign in to comment.