We need to know the timing of the keyboard showing up so that we can slide the view up, for that we have the NSNotificationCenter: NotificationCenter . default . addObserver ( self , selector: #selector ( keyboardWillShow ), name: UIResponder . keyboardWillShowNotification , object: nil ) So basically what this does is that it sets an observer to tell us when the keyboard is about to show. In other words, it is as if our view controller is signing up to be notified when an event is coming up. In the code written above, when the viewController is notified of the keyboard showing, we want it to execute the function: keyboardWillShow() @objc func keyboardWillShow ( _ notification: Notification ){ self . view . frame . origin . y = - getKeyboardHeight ( notification ) } What this function is doing is to simply shifting the view up by a distance that equals the hight of the keyboard. NSNotifications carry information in a...