Keyboard Placement



To improve the user experience on the edit page I wanted the fields to move up the height of the keyboard when the user selected a textfield at the bottom of the page.



The tutorials below helped me to understand how to get the height of the keyboard and how to move the location of the view up by the height of the keyboard. The tutorials are a bit older. The code

NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChange(notification:)), name:NSNotification.Name.UIKeyboardWillShow, object: nil)

has changed as follows.