0

I have a form with many UITextFields and I'd like the user to have the ability to jump to the next after typing.

Nor "Next" neither "Continue" does anything when I set if I set it in the "Return Key" section on my storyboard.

breakline
  • 5,006
  • 5
  • 35
  • 70

1 Answers1

1

You can try

self.fnTexf.returnKeyType = .next

//

func textFieldShouldReturn(_ textField: UITextField) -> Bool {   //delegate method


    if  let next = self.view.viewWithTag(textfield.tag + 1) as? UITextfeild
    {
        next.becomeFirstResponder()
    } 
     else
       {
           textField.resignFirstResponder()

        }


    return true
 }
Sh_Khan
  • 86,695
  • 6
  • 38
  • 57