Type 'NSNotification.Name' has no member 'keyboardDidShowNotification'

前端 未结 4 1975
傲寒
傲寒 2020-12-05 13:42

I\'m getting this error with Swift 4.2

Type \'NSNotification.Name\' has no member \'keyboardDidShowNotification\'

Here is my cod

4条回答
  •  [愿得一人]
    2020-12-05 14:24

    Working on swift 4,2

     func bindToKeyboard(){
        NotificationCenter.default.addObserver(self, selector: #selector(UIView.keyboardWillChange(_:)), name:
            UIApplication.keyboardWillChangeFrameNotification
            , object: nil)
    
    
    }
    

提交回复
热议问题