I'm getting this error with Swift 4.2
Type 'NSNotification.Name' has no member 'keyboardDidShowNotification'
Here is my code:
NotificationCenter.default.addObserver(self, selector: #selector(self.keyboardDidShow(notification:)), name: NSNotification.Name.keyboardDidShowNotification, object: nil)
Following one was working fine with Swift 4 but not with Swift 4.2
NotificationCenter.default.addObserver(self, selector: #selector(self.keyboardDidShow(notification:)), name: NSNotification.Name.UIKeyboardDidShow, object: nil)
Apple document Ref: NSNotification.Name.keyboardDidShowNotification
Working on swift 4,2
I believe you use it like this now.
It is listed in
UIResponder
doc as a Type Property.