I would like to intercept what button/textview or #tag the user tapped when I reach the func keyboardDidShow
@objc func keyboardDidShow(notification: NSNotification) {
guard let userInfo = notification.userInfo else {return}
guard let keyboardSize = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue else {return}
let keyboardFrame = keyboardSize.cgRectValue
if isheight == 0.0 { isheight = keyboardFrame.height}
if self.view.bounds.origin.y == 0{
self.view.bounds.origin.y += keyboardFrame.height
}
}
On my VC I have this line to call the func
NotificationCenter.default.addObserver(self, selector: #selector(keyboardDidShow),name:Responder.keyboardDidShowNotification, object: nil)
Is there a possibilty ?