From b4f08c391c9f8638d5f2736f94de2d9c3acfc00e Mon Sep 17 00:00:00 2001 From: Will Li Date: Thu, 1 May 2014 15:52:22 -0700 Subject: [PATCH] fix textField frame change issue Fix a bug that causes textField frame change even when canAdjustTextView = NO --- KeyboardTextFieldDemo/IQKeyBoardManager/IQKeyboardManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KeyboardTextFieldDemo/IQKeyBoardManager/IQKeyboardManager.m b/KeyboardTextFieldDemo/IQKeyBoardManager/IQKeyboardManager.m index d79d36cc..196987c2 100755 --- a/KeyboardTextFieldDemo/IQKeyBoardManager/IQKeyboardManager.m +++ b/KeyboardTextFieldDemo/IQKeyBoardManager/IQKeyboardManager.m @@ -619,7 +619,7 @@ -(void)keyboardWillShow:(NSNotification*)aNotification if (_enable == NO) return; //Due to orientation callback we need to resave it's original frame. - textFieldViewIntialFrame = _textFieldView.frame; + textFieldViewIntialFrame = _enable && _canAdjustTextView ? _textFieldView.frame : CGRectZero; if (_shouldAdoptDefaultKeyboardAnimation) {