Implementing the 'next' option in the keyboard for iPhone SDK
<p>I am having an awful hard time trying to implement the task of when the user selects the 'next' button in the keyboard, the user is then sent to the next text field to start editing. In my example I have three text fields. Here is what I've done, hopefully you can fill me in on where I am going wrong. Keep in mind I just picked up SDK a few weeks ago so that may be part of the problem :)</p>

<p>In my ViewControler.h file I have created the following method</p>

<pre><code>-(IBAction)nextPressed:(id) sender;
</code></pre>

<p>In my ViewController.m file, I have created the following action</p>

<pre><code>-(IBAction)nextPressed:(id) sender 
{
    if ([txtUserName isFirstResponder]) 
    {
        [txtUserName2 becomeFirstResponder];
    }
    if ([txtUserName2 isFirstResponder]) 
    {
        [txtUserName3 becomeFirstResponder];
    }
}
</code></pre>

<p>In my .xib file, I have linked the first text field (right clicking on the text field and dragging to Files Owner and selecting the 'nextPressed:' option under Events) to my File Owner. I have tried linking to just the first text field and when that didn't work all of the three text fields. I've also tried linking not to the File's Owner but First Responder for one text field, then all of the text fields, with no luck. Also, for each text field I have selected the Return Key as 'NEXT'.</p>

<p>Now when I Build/Run I am able to edit the text field and see the 'next' button in the lower right, however it doesn't move me to the next field. </p>

<p>What step am I doing wrong here? I used instructions from this post (http://stackoverflow.com/questions/467881/how-do-you-change-the-uicontrol-with-focus-on-iphone) but seem to be missing something huge here. </p>

<p>Any help with this would be <em>greatly</em> appreciated. I've been staring at this for the past four hours and Googling every possible search term I can come up with and can't easily wrap my head around the steps needed to accomplish this. Again, and help would be very helpful :)</p>
