tf1.addTarget(tf2, action: #selector(becomeFirstResponder), for: .editingDidEndOnExit) tf2.addTarget(tf3, action: #selector(becomeFirstResponder), for: .editingDidEndOnExit)