For a long while now, I've been looking for a Swift implementation that utilizes UIKeyboardWillChangeFrameNotification
so far I haven't come across anything. I'm trying to get this working so that I can handle the keyboard show and hide in one method as stated in the documentation here and here written in objective-c.
and replace these:
// Register your Notification, To know When Keyboard appears.
NotificationCenter.default.addObserver(self, selector: #selector(myKeyboardWillShowMethod), name: .UIKeyboardWillShow, object: nil)
// Register your Notification, To know When Keyboard hides.
NotificationCenter.default.addObserver(self, selector: #selector(myKeyboardWillHideMethod), name: .UIKeyboardWillHide, object: nil)