title: dequeueReusableCellWithIdentifier not dequeuing custom UITableViewCell from Nib?
body: <p>I've got this issue for almost a week now and it's really driving me crazy. I've read a lot of topics on Stackoverflow despite any success. Hope anyone could help me out...</p>
  
  <p><strong>The situation:</strong></p>
  
  <p>I got a UITableView with a custom UITableViewCell which I load from a Nib. I do so in the <code>ViewDidLoad</code> of the TableView like this:</p>
  
  <pre><code>[self.myTableView registerNib:[UINib nibWithNibName:@"DividendCell" bundle:nil] forCellReuseIdentifier:@"DividendReuseCell"];
  </code></pre>
  
  <p>The custom cell has got a few labels including: <code>issueName</code> and <code>issueType</code>.</p>
  
  <p>In the <code>cellForRowAtIndexPath</code> method I dequeue the reusable cell like this and assign the labels:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      DividendCell *cell;
      cell = [self.myTableView dequeueReusableCellWithIdentifier:@"DividendReuseCell" forIndexPath:indexPath];
  
      dividend *div = [[[aAgendaItems objectAtIndex:indexPath.section] agendaItems] objectAtIndex:indexPath.row];
      [cell setDiv:div];
  
      return cell;
  }
  </code></pre>
  
  <p>I suppose I don't need to check <code>if (!cell)</code> since I use a custom Nib which will always return a cell.</p>
  
  <p>But the problem is that it looks like the cells are not being dequeued. When I scroll down I can see the labels are being duplicated on top of each other. I have no clue what's going wrong. I did it this way in other classes and had no problems.</p>
  
  <p>Any help is much appreciated! :)</p>
  
  <p><strong>EDIT:</strong> Screenshot to indicate better what's going wrong:</p>
  
  <p><a href="http://imgur.com/DFAqsai" rel="nofollow">http://imgur.com/DFAqsai</a></p>
  
  <p><strong>EDIT 2</strong> Here's the code for DividendCell
  I use this method to assign the labels.</p>
  
  <pre><code>-(void)setDiv:(dividend *)div {
      issueName.text = [[NSString alloc] initWithString:[[[div RelatedIssue] ShortName] capitalizedString]];
      issueType.text = [[NSString alloc] initWithString:[div Description]];
  
      issueCurrency.text = [[NSString alloc] initWithString:[div Currency]];
      issueKoers.text = [[NSString alloc] initWithString:[super formatDouble:[div BrutValue]]];
  
      NSDateFormatter *format = [[NSDateFormatter alloc] init];
      NSLocale *loc = [[NSLocale alloc] initWithLocaleIdentifier:@"nl_NL"];
      [format setLocale:loc];
      [format setDateFormat:@"dd MMM"];
  
      exDividendDate.text = [[NSString alloc] initWithString:[format stringFromDate:[div ExDividendDate]]];
  
      NSComparisonResult result = [[div PaymentDate] compare:[NSDate date]];
      exPaymentDate.text = [[NSString alloc] initWithString:[format stringFromDate:[div PaymentDate]]];
      if (result==NSOrderedAscending) {
          [exPaymentDate setTextColor:[UIColor darkGrayColor]];
      } else {
          [exPaymentDate setTextColor:[UIColor blackColor]];
      }
      [loc release];
  }
  </code></pre>