Fix transition bug when the keyboard is presented
This MR improves the transition when navigating from a screen while presenting keyboard.
This should fix the issue: [Registration] UI transition bug when having the keyboard enabled.
What was done
-
Refactor code that loads view in OnboardingCodeController
andProfileCodeController
:- Make sure the view and layout are set up correctly.
- Avoid using
SnapKit
. - When finished initial setup, call
setNeedsLayout
andlayoutIfNeeded
so the view is laid out immediately.
-
Dismiss the keyboard on OnboardingPhoneController
andProfilePhoneController
before navigating to next screen.
Dismissing the keyboard is not mandatory, but I think it helps to achieve a visually satisfying transition.
Preview
Before | After (fix layout) | After (fix layout + dismiss keyboard) |
---|---|---|
before | after-1 | after-2 |
Edited by Dariusz Rybicki