Skip to content

Fix transition bug when the keyboard is presented

Dariusz Rybicki requested to merge fix/transition-bug-when-keyboard-visible into dev

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 and ProfileCodeController:
    • Make sure the view and layout are set up correctly.
    • Avoid using SnapKit.
    • When finished initial setup, call setNeedsLayout and layoutIfNeeded so the view is laid out immediately.
  • Dismiss the keyboard on OnboardingPhoneController and ProfilePhoneController 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

Merge request reports