键盘遮挡控件: super.viewDidLoad(){ // Do any additional setup after loading the view, typically from a nib. //监听键盘弹出通知 NotificationCenter.default.addObserver(self,selector: #selector(keyboardWillShow(_:)), name:UIResponder.keyboardWillShowNotification, obj…