I currently have this setting on my table view.:
tableView.keyboardDismissMode = .interactive
I have a notification observer setup like so:
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: NSNotification.Name.UIKeyboardWillHide, object: nil)
My keyboardWillHide
method is called when the keyboard is finally dragged down and off the screen. Is there a way to detect how the keyboard was dismissed? When keyBoardWillHide
is called I need to know if it was because the return key was pressed or if the user dragged it so I can tweak animations. Is there any sort of callback for this?