Description
I discovered an issue involving the following code in Controller A:
In Controller A, there is a TextField. After bringing up the keyboard to input text and then dismissing it, we navigate to Controller B.
Controller B also contains a TextField. However, when the keyboard is brought up in Controller B, the TextField cannot be pushed above the keyboard, making it impossible to input text.
The root cause is that in the keyboardWillShow method, _kbFrame and oldKBFrame are equal, which prevents adjustPosition from being executed.
The reason why _kbFrame and oldKBFrame are equal is as follows:
keyboardWillShow
keyboardWillHide, enable is false, so _kbFrame can not reset CGRectZero
should the following two lines of code be placed before the check for enable?
_kbFrame = CGRectZero;
[self notifyKeyboardSize:_kbFrame.size];