title: UItextfields autofocus
body: <p>i have 6 textfields named digit1,digit2..etc upto digit6 added as a subview over a view. i want the digit2 textfield to autofocus once the user enters a digit in the digit1 textfield and similarly digit3 should autofocus when a digit is entered in digit2 textfield.Below shown is the code i tried.</p>
  
  <pre><code>-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range  replacementString:(NSString *)string
  {
      if(textField.text.length&gt;=1)
      {
          [textField resignFirstResponder];
          UITextField *_textField=(UITextField*) [self.view viewWithTag:textField.tag+1];
          [_textField becomeFirstResponder];
      }
      return TRUE;
  } 
  </code></pre>
  
  <p>What happens here is when i enter a digit in digit1 it dosent appear in digit 1 but it appears in digit2 and also when i click delete button the control is transfered to the subsequent textfields rather than deleting the text in the current textfield.Please help me to fix this.</p>