title: Data lose On UITableViewCell When UITableView Scrolling?
body: <p>I am trying to implement <code>UITableview</code> based application. In my <code>tableView</code> their is 10 Section and each section having one row.
  I want implement each section have Different type of <code>ContentView</code>(1-8 same <code>ContentView</code> 9th section Different <code>ContentView</code>). I did this code For that.</p>
  
  <pre><code>- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return 10;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
  
      return 1;
  }
  
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier1 = @"Cell1";
      static NSString *CellIdentifier2 = @"Cell2";
      UITextField *textField;
      UITextView *textView;
      NSUInteger section=[indexPath section];
      if(section == 9){
          UITableViewCell *cell=[self.tableView cellForRowAtIndexPath:indexPath];
          //UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
          if(cell==nil){
              cell=[[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1]autorelease];
              textView=[[UITextView alloc]initWithFrame:CGRectMake(5, 5, 290, 110)];
              [textView setBackgroundColor:[UIColor scrollViewTexturedBackgroundColor
                                            ]];
              [textView setTag:([indexPath section]+100)];
              [cell.contentView addSubview:textView];
          }else{
              textView=(UITextView*)[cell.contentView viewWithTag:([indexPath section]+100)];
          }
          return cell;
      }else {
          UITableViewCell *cell=[self.tableView cellForRowAtIndexPath:indexPath];
         // UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier2];
          if(cell==nil){
              cell=[[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier2]autorelease];
              textField=[[UITextField alloc]initWithFrame:CGRectMake(5, 5, 290, 50)];
              [textField setBackgroundColor:[UIColor scrollViewTexturedBackgroundColor]];
              [textField setTag:([indexPath section]+100)];
              [cell.contentView addSubview:textField];
          }else{
              textField=(UITextField*)[cell.contentView viewWithTag:([indexPath section]+100)];
  
          }
  
          return cell;
      }  
  
  
      return nil;
  
  }
  </code></pre>
  
  <p>My problem are:
  1. After type some thing in the <code>UITextField</code>/<code>UITextView</code>  i am scrolling in the <code>UITableView</code>. that time all data  in the <code>UITableViewCell</code>(<code>UITextField</code>/<code>UITextView</code>) was lose, except last cell data.
  2. If i create cell </p>
  
  <pre><code> UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  </code></pre>
  
  <p>Instead of </p>
  
  <pre><code> UITableViewCell *cell=[self.tableView cellForRowAtIndexPath:indexPath];
  </code></pre>
  
  <p>Data will repeating . How can i over come this problem?</p>