When SwiftUI was introduced TextField and Software keyboard on iOS didn’t play very well together. You would have to come up with all kinds of observers to listen for keyboard open/close events and work around that. Well that has changed, starting with iOS 14 SwiftUI has solved this problem. There is no extra work needed from our side, as long as the view is inside safeArea, TextField will move up to allow keyboard space and you would still be able to type and see what’s being typed in TextField.
For this example, we will push our username, password fields down so when TextField is focused, the keyboard can push TextFields up so they can stay visible.