There are some typos in this code (overrideopenfunc vs override open func).
However, could you show how you defined
SCLAlertView
How did you declare
keyboardWillShow
Did you declare it as @objc ? You should.
You should change the way you call:
NotificationCenter.default.addObserver(self, selector: #selector(SCLAlertView.keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification.Name.UIKeyboardWillShow, object: nil); // Error: Value of type 'NSNotification.Name' has no member 'Name'
to
NotificationCenter.default.addObserver(self, selector: #selector(SCLAlertView.keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil);
syntax : UIResponder.keyboardWillShowNotification.Name.UIKeyboardWillShow. is incorrect
I do not understand the problem for:
NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillShowNotification, object: nil) //Error: 'keyboardWillShowNotification' has been renamed to 'NSNotification.Name.UIKeyboardWillShow'
It work for me with XCode 11.1 (which XCode version are you using ?).
Could you do a command-click on keyboardWillShowNotification and select jump to definition.
Report what you get.