title: Pattern to valid a dynamic form using a UITableView
body: <p>I have got a dynamic form similar to contact form on iphone and ipad.
  A contact has "static" informations like last name, first name, address, ... And he also has "dynamic" informations like friends, Hobbies, whatever ...</p>
  
  <p>So I created an <code>UITableView</code> which is composed of difference types of cell like <code>StaticInformationCell</code>, <code>FriendCell</code>, <code>HobbyCell</code>. Each type of cells has one or several <code>UItextfield</code> regarding the informations it needs.</p>
  
  <p>It works pretty well for self cell validation. I mean when the user edits the <code>UITextField</code> of one particular cell, this one can valid or not the value and display or not the overview in the <code>UITextField</code>.</p>
  
  <p>My problem is that the <code>UITableView</code> doesn't know if the entire form (all the cells) is valid when the user submits the form. I don't know how the <code>UITableView</code> can "ask" each cell if it is valid or not.</p>
  
  <p>I tried to store in a <code>NSMutableSet</code> the cells when they were created and send a message <code>isValid</code> to each cell. Unfortunetly I don't know why some cells are "duplicated in this" <code>Set</code> :</p>
  
  <pre><code>&lt;FriendEditCell: 0x8ddf9e0; baseClass = UITableViewCell; frame = (0 383; 768 70); alpha = 0; hidden = YES; autoresize = W; layer = &lt;CALayer: 0x8db4010&gt;&gt;,
  &lt;FriendEditCell: 0x8dcfd80; baseClass = UITableViewCell; frame = (0 383; 768 70); autoresize = W; layer = &lt;CALayer: 0x8d90920&gt;&gt;
  </code></pre>
  
  <p>I can't use a static <code>UITableView</code> because an user can add as many friends as he wants.</p>
  
  <p>Do you have an idea how I can fix my validation problem ?</p>