title: UITableView reloadData does not reload
body: <p>I am quite puzzled why reloadData does not reload the tableview. It does not call <code>numberOfRowsInSection</code>...</p>
  
  <p>The <code>fetchedResultsController</code> does get the new row after having saved the new data into core-data</p>
  
  <p>Before adding new data to the tableview</p>
  
  <pre><code>2011-12-29 19:09:08:213 CaveConditions[56423:71939] FRC 170
  </code></pre>
  
  <p>After <code>viewWillAppear</code> and adding data</p>
  
  <pre><code>2011-12-29 19:09:35:908 CaveConditions[56423:71939] FRC NEW 171
  </code></pre>
  
  <p>The tableView (aTableView) is not nil before calling reloadData</p>
  
  <pre><code>2011-12-29 19:18:27:334 CaveConditions[56525:71939] TableVIew: &lt;UITableView: 0x9c12000; frame = (0 0; 320 367); clipsToBounds = YES; autoresize = W+H; layer = &lt;CALayer: 0x751cbb0&gt;; contentOffset: {0, 0}&gt;
  </code></pre>
  
  <p>As soon as I restart the app it shows the new content... I am using Storyboard and have done all the connection between the tableview and the delegate / data source and checked it multiple times. The Class is a UIViewController.</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
  {
  [super viewWillAppear:animated];
  self.fetchedResultsController = nil;
  
  NSError *error;
  if (![[self fetchedResultsController] performFetch:&amp;error]) {
      // Update to handle the error appropriately.
      NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
  }
  
  id &lt;NSFetchedResultsSectionInfo&gt; sectionInfo = [[fetchedResultsController sections] objectAtIndex:0];
  NSLog(@"FRC NEW %d",[sectionInfo numberOfObjects]);
  
  [self.aTableView reloadData];
  }
  </code></pre>
  
  <p>Not sure what the problem is here... Any ideas?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I am lazyloading FRC</p>
  
  <pre><code>- (NSFetchedResultsController *)fetchedResultsController 
  {
  if (!fetchedResultsController)
  {
      NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
  
      if (isNormalCell)
      {
          fetchRequest.entity = [NSEntityDescription entityForName:@"Condition" inManagedObjectContext:self.context];
          fetchRequest.sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"diveDate" ascending:NO]];        
          fetchRequest.predicate = [NSPredicate predicateWithFormat:@"cave = %@", cave];
      } else
      {
          fetchRequest.entity = [NSEntityDescription entityForName:@"Condition" inManagedObjectContext:self.context];
          fetchRequest.sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"insertDate" ascending:NO]];
          fetchRequest.returnsDistinctResults = YES;
      }
      fetchRequest.fetchBatchSize = 20;
  
  
      fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest 
                                                                     managedObjectContext:context 
                                                                       sectionNameKeyPath:nil 
                                                                                cacheName:nil];
  
      fetchedResultsController.delegate = self;
  }
  
  return fetchedResultsController;
  }
  </code></pre>
  
  <p>Here some code</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
  {
  static NSString *CellIdentifier;
  
  if (!isNormalCell)
      CellIdentifier = @"conditionCellReport";
  else
      CellIdentifier = @"conditionCell";
  
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  if (cell == nil) {
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
  }
  
  // Set up the cell...
  [self configureCell:cell atIndexPath:indexPath];
  
  return cell;
  }
  
  
  - (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath 
  {
      Condition *condition = [fetchedResultsController objectAtIndexPath:indexPath];
  
      ConditionCell *conCell = (ConditionCell *)cell; 
  
      // Reset cell tag which normally contains the ConditionID
      conCell.tag = 0;
      conCell.img.image = nil;
  
      conCell.lineLabel.text = [condition.line valueForKey:@"line"];
      conCell.flowProgress.progress = [[condition.flow valueForKey:@"flowValue"] floatValue];
      conCell.percolationProgress.progress = [[condition.percolation valueForKey:@"percolationValue"] floatValue];
      conCell.sedimentProgress.progress = [[condition.sediment valueForKey:@"sedimentValue"] floatValue];
      conCell.visProgress.progress = [[condition.visibility valueForKey:@"visValue"] floatValue] / 25;
      conCell.tag = [condition.ccId intValue];
  ...
  </code></pre>
  
  <p>Found another problem. After saving the data and going back to the tableview when trying to scroll it shows only white cells.. it does not reload the old cells too.</p>
  
  <p><img src="https://i.stack.imgur.com/WtSf1.jpg" alt="enter image description here"></p>