Swift 5 en la acción del botón de retorno
Swift 5:
class YourClass: UIViewController, UITextFieldDelegate {
// will trigger when return button from keyboard is pressed
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
performAction(textField)
return true
}
private func preformAction(_ textField:UITextField){
//... code here ...
}
}
Wicked Wolf