title: iPhone:How to manage UITextfield delegate methods on dynamic number of customcells
body: <p>I have dynamic number of textfields in my tableview, I put each textfield into a customcell in IB  and load the cells by nibName.</p>
  
  <p>I want to validate and show alert as user enters data, also when editingisDone I want to get the input value from user and save it to the relavent object. </p>
  
  <p>for instance these are some delegate methods I can use:</p>
  
  <pre><code>- (void)textFieldDidEndEditing:(UITextField *)textField{
     //save the data
  }
  
  - (IBAction)textFieldDoneEditing:(id)sender {
      //hide the keypad when done is pressed
      [sender resignFirstResponder];
  }
  
  - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange{}
  </code></pre>
  
  <p>2 questions:</p>
  
  <p>1-When getting user input and validating the input how will I know which textfield's delegate is fired since there are dynamic numbers of cells and textfields, and how can I manage this? </p>
  
  <p>2-For hiding the keyboard I did this but not sure this is correct;
       -In IB I opened the customcell-->right click uitextfield and connect its didEndonExit to <strong>FirstResponder</strong>'s textFieldDoneEditing method. This works but I can't return if I didnt add any chars to textfield. so it forces to write something in order to press the button.</p>