title: UISearchBar with UITableView containing custom cells => blank cells
body: <ul>
  <li><p>I have a UITableView containing custom cells. All works fine. But after, I decided to add a searchBar in order to... Search !</p></li>
  <li><p>So, I added a <em>"Search Bar and Search Display Controller"</em> from the <em>"Object Library"</em> in my xib file, under the UITableView.</p></li>
  <li><p>I created a specific class for the custom cell :</p>
  
  <p><strong>"CustomCell.h"</strong></p>
  
  <pre><code>@class CustomCell;
  
  @interface CustomCell : UITableViewCell
  {
  }
  
  @property (weak, nonatomic) IBOutlet UILabel *lblDate;
  @property (weak, nonatomic) IBOutlet UILabel *lblAuteur;
  
  @end
  </code></pre>
  
  <p><strong>"CustomCell.m"</strong></p>
  
  <pre><code>no interesting stuff
  </code></pre>
  
  <p><strong>"CustomCell.xib"</strong></p>
  
  <p><img src="https://i.stack.imgur.com/zMAHg.png" alt="enter image description here"></p></li>
  <li><p>The <em>"Event"</em> class :</p>
  
  <pre><code>@interface Event : NSObject
  {
  }
  
  @property (strong, nonatomic) NSString *desc;
  @property (strong, nonatomic) NSString *dateCreation;
  
  @end
  </code></pre></li>
  <li><p>And the view containing the <em>UITableView</em> and the <em>UISearchBar</em> :</p>
  
  <pre><code>-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *cellIdentifier = @"cell";
  
      // Determinate the current event
      Event *currentEvent;
      if (tableView == self.searchDisplayController.searchResultsTableView)
          currentEvent = [filteredArray objectAtIndex:indexPath.row];
      else
          currentEvent = [notFilteredArray objectAtIndex:indexPath.row];
  
      CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
  
      if(cell == nil)
          cell = [[CustomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
  
      cell.lblAuteur.text = [currentEvenement desc];
      cell.lblDate.text = [currentEvenement dateCreation];
  
      return cell;
  }
  </code></pre></li>
  <li><p>Ok, now we can come to my problem. After loading the tableView, the custom cells are displaying well. But not if I use the <em>SearchBar</em> :</p>
  
  <ol>
  <li>If there is an event with the desc attribute equal to <strong>"foo"</strong>, and if I enter <strong>"bar"</strong> in the <em>SearchBar</em>, I obtain the <em>"No results"</em> message. It's normal.</li>
  <li>If there is an event with the desc attribute equal to <strong>"foo"</strong>, and if I enter <strong>"foo"</strong> in the <em>SearchBar</em>, the cells are displaying, but <strong>without their content</strong> ! I'm just seeing the cells' borders, and the <em>lblDate</em> and the <em>lblAuteur</em> are equal to <em>nil</em>.</li>
  </ol></li>
  </ul>
  
  <p>Why have I this behaviour ? Thanks a lot for your help... I precise that the <em>filteredArray</em> and the <em>notFilteredArray</em> are correctly filled (I checked that many times). It means that the search mechanism is working well.</p>