title: UITableView mixing content in landscape
body: <p>I've been banging my head  against the wall whole day now. I have <code>UITableViewController</code> which has two sections: first on is optional, depending if the is data to show; second is always and has 5 cells. All cells have <code>UILabel</code> and <code>UITextField</code> (field has sometime picker or datepicker, depending on data). When I change orientation to landscape whole table is going crazy and is mixing fields texts between rows and also between sections while scrolling. I've read it has something to do with reusing cells, but nothing helped so far. Even if I keep new data model for storing fields content it still gets misplaced... </p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  SearchCell *cell = (SearchCell*)[tableView dequeueReusableCellWithIdentifier:@"SearchCell" forIndexPath:indexPath];
  cell.valueField.delegate = self;
  
  if (_attributesArray &amp;&amp; indexPath.section == 0) {
      cell.titleLabel.text = _attributesArray[indexPath.row][@"name"];
      cell.valueField.text = _attributesArray[indexPath.row][@"value"];
  
      switch ([_attributesArray[indexPath.row][@"type"] intValue]) {
          case ATTR_INT:{
              cell.valueField.keyboardType = UIKeyboardTypeNumberPad;
          }
              break;
          case ATTR_DEC:{
              cell.valueField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
          }
              break;
          case ATTR_DATE:{
              cell.valueField.inputView = self.datePicker;
          }
              break;
          case ATTR_TEXT:{
              cell.valueField.keyboardType = UIKeyboardTypeDefault;
          }
              break;
          case ATTR_BOOL:{
  //                cell.valueField.inputView = self.choicePicker;
          }
              break;
      }
  }else{
      switch (indexPath.row) {
          case 0:{
              cell.titleLabel.text = @"Name/Link";
              cell.valueField.keyboardType = UIKeyboardTypeDefault;
          }
              break;
          case 1:{
              cell.titleLabel.text = @"Full text";
              cell.valueField.keyboardType = UIKeyboardTypeDefault;
          }
              break;
          case 2:{
              cell.titleLabel.text = @"Uploaded before";
              cell.valueField.inputView = self.datePicker;
          }
              break;
          case 3:{
              cell.titleLabel.text = @"Uploaded after";
              cell.valueField.inputView = self.datePicker;
          }
              break;
          case 4:{
              cell.titleLabel.text = @"Document type";
  //                cell.valueField.inputView = self.choicePicker;
          }
              break;
      }
  }
  
  return cell;
  }
  </code></pre>
  
  <p>It's very annoying issue, thanks in advance</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried this, but no luck so far. I put labels and fields values in two arrays of dictionaries, for two sections. It's mixing now textfields values in both portrait and landscape orientations...</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    SearchCell *cell;
  
    if (_attributesArray &amp;&amp; indexPath.section == 0) {
        cell = (SearchCell*)[tableView dequeueReusableCellWithIdentifier:@"Attribute" forIndexPath:indexPath];
        if (cell == nil) {
            cell = [[SearchCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Attribute"];
        }
        cell.titleLabel.text = _attributesArray[indexPath.row][@"name"];
        cell.valueField.text = _attributesArray[indexPath.row][@"value"];
        cell.valueField.delegate = self;
  
    }else{
        cell = (SearchCell*)[tableView dequeueReusableCellWithIdentifier:@"Property" forIndexPath:indexPath];
        if (cell == nil) {
            cell = [[SearchCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Property"];
        }
        cell.titleLabel.text = _propertiesArray[indexPath.row][@"name"];
        cell.valueField.text = _propertiesArray[indexPath.row][@"value"];
        cell.valueField.delegate = self;
  
    }
  
    return cell;
  }
  </code></pre>