Swift 5 doesn’t working method from tutorial Type ‘NSNotification.Name’ has no member ‘UIResponder’

Just remove NSNotification.Name in name

NotificationCenter.default.addObserver(self, selector: #selector(kbWillShow), name: NSNotification.Name.UIResponder.keyboardWillShowNotification, object: nil)

It must be like :

 NotificationCenter.default.addObserver(self, selector: #selector(kbWillShow), name: UIResponder.keyboardWillShowNotification, object: nil)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top