Closed s4cha closed 6 years ago
@s4cha do you think the iOS 11 check is necessary at all for the height caching? Having the height ready doesn't seem to be a bad idea, just need to make sure it works correctly on all versions.
@maxkonovalov I agree, I narrowed it down to iOS 11 to be specific but as you point out, it adds unnecessary complexity.
👍
We have a set of signup screens that are pushed one after another.
Everything works fine if we call
becomeFirstResponder()
inviewDidAppear
thekeyboardWillChangeFrame
is called and everything works as expected.The thing is calling
becomeFirstResponder
inviewDidAppear
animates the keyboard.If we want to have the keyboard stay in position (already shown) in the screens, we can call
becomeFirstResponder
in viewDidLoad.In iOS 11, the issue is that the keyboard notifications are not called if the keyboard is already on screen so we end up with the button under the keyboard. The underlying reason is that
keyboardWillChangeFrame
is not called on IOS11 if the keyboard stays shown between controllers, which seems quite logical actually.The fix stores the previous keyboard height and sets in back up when setting up a new controller, only if the device is running iOS 11 :)