         
         NotificationCenter.default.addObserver(
             self,
-            selector: #selector(PopupPresentationController.keyboardWillShow(_:)),
-            name: NSNotification.Name.UIKeyboardWillShow,
+            selector: #selector(PopupPresentationController.keyboardDidShow(_:)),
+            name: NSNotification.Name.UIKeyboardDidShow,
             object: nil)
         NotificationCenter.default.addObserver(
             self,
-            selector: #selector(PopupPresentationController.keyboardWillHide(_:)),
-            name: NSNotification.Name.UIKeyboardWillHide,
+            selector: #selector(PopupPresentationController.keyboardDidHide(_:)),
+            name: NSNotification.Name.UIKeyboardDidHide,
             object: nil)
     }
     

    }
    
    
    func keyboardWillShow(_ notification: Foundation.Notification) {
        isShowKeyboard = true
        
        if let userInfo = (notification as NSNotification).userInfo,

            containerView?.frame.size.height = keyboardEndFrame.origin.y
        }
    }
    func keyboardDidHide(_ notification: Foundation.Notification) {
        isShowKeyboard = false
        
        if let userInfo = (notification as NSNotification).userInfo,
