In modern UIKit it's as simple as constraining to the keyboard layout guide. That gives you full animation support for free as well, no more need to listen for the notification and manually set up animations with the same timing and curve. On iPads the keyboard guide can even help you avoid the split keyboard, it's really nice.
Of course SwiftUI gives you almost none of this control, forcing you to hope the magic automatic support works how you expect.
But then neither help you with any of the other interactions, like any background dimming you may want, or tapping away from the keyboard to dismiss. That has to be done manually.
Of course SwiftUI gives you almost none of this control, forcing you to hope the magic automatic support works how you expect.
But then neither help you with any of the other interactions, like any background dimming you may want, or tapping away from the keyboard to dismiss. That has to be done manually.