title: How to move cursor from one text field to another automatically in swift ios programmatically?
body: <pre><code>    func textFieldDidBeginEditing(textField: UITextField) {
      scrlView.setContentOffset(CGPointMake(0, textField.frame.origin.y-70), animated: true)
  
  
      if(textField == firstDigit){
  
          textField.becomeFirstResponder()
          secondDigit.resignFirstResponder()
      }
  
  
      else if(textField == secondDigit){
  
          textField.becomeFirstResponder()
          thirdDigit.resignFirstResponder()
      }
  
      else if(textField == thirdDigit){
          //textField.becomeFirstResponder()
          fourthDigit.becomeFirstResponder()
      }
  </code></pre>
  
  <p>I am using four textfields for OTP entry in which only one number can be entered at a time. After entering the number I need to move the cursor automatically to next textfield.</p>