UITextField and UITableViews... Am I doing this correctly? If not, what is the best way?
<p>I have an array of folders.  Each folder is listed as a table view row.  </p>

<p>When I display my table, I populate it with a set of textfields on the left hand side of the row (i want the user to be able to edit them) and a set of switches (on/off) on the right hand side of the row.</p>

<p>All is working well, you can touch the textfield and the keyboard appears.  You can changed the values of the switch each time also.</p>

<p>The problem I'm having is knowing which text field has been changed so that I can update my array ready to save the values.</p>

<p>I'm using..</p>

<pre><code>    [textField addTarget:self action:@selector(textFieldDone:) forControlEvents:UIControlEventEditingDidEndOnExit];
</code></pre>

<p>and...</p>

<pre><code>-(void)textFieldDone:(UITextField *)textField
</code></pre>

<p>The problem is that the textField object does not contain any unique information about it in the textFieldDone selector.  I've tried setting </p>

<pre><code>[textField setTag:rowNumber];
</code></pre>

<p>But it doesn't show as tag is not part of the textField object.</p>

<p>Anyone any ideas on the best way of doing this?  Surely there must be lots of applications that have have textfields in table rows that you can switch between?  </p>

<p>Or maybe I'm missing something here....</p>
