I have a textfield which can be edited. Below this textfield, I have another textfield on the tap of which I go to another screen.
When I tap the 1st textfield, the keyboard comes up. But when I tap on the 2nd textfield the keyboard still remains (maybe because it is also a textfield). But I want the keyboard to dismiss the moment I tap the second textfield.
I'm using IQKeyboardManager
.
This is what I have..But it's not working...
@IBAction func secondTextfield_Clicked(_ sender: Any) {
(sender as! UITextField).resignFirstResponder()
self.performSegue(withIdentifier: "mySegue", sender: nil)
}