title: iOS: UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:
body: <p>I've checked a few other questions but still can't figure out why this is happening. All I know is after using the description code from <a href="https://stackoverflow.com/questions/11290746/uitableview-datasource-must-return-a-cell-from-tableviewcellforrowatindexpath">this</a> question the cell's value is <code>null</code>. I've set the <code>delegate</code> and <code>datasource</code> of the <code>table</code> correctly and I can't see where this is going wrong. </p>
  
  <p>If I set the return value of the following method to 0, no error occurs because the <code>cellForRowAtIndexPath</code> method doesn't really take place. So if I set it as 1 (as it should be) it'll then throw the error. I've synthesized the <code>NSArray</code> and checked that its populated (although that shouldn't matter I guess) and basically what is meant to happen is I press a <code>button</code> that searches and then places the results in the <code>table</code>. So before this the <code>tableview</code> is empty.</p>
  
  <pre><code>- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return 1;
  }
  </code></pre>
  
  <p>Here's the <code>cellForRowAtIndexPath</code> method itself. I've tried just using the basic template method too, which still throws the same error.</p>
  
  <pre><code>    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath     *)indexPath
      {
          static NSString *CellIdentifier = @"Cell";
          UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
      // Configure the cell...
  
      NSDictionary *aResult = [results objectAtIndex:[indexPath row]];
      NSLog(@"RESULTS IN TABLE %i", [results count ]);
  
  
      id key = [results objectAtIndex:[indexPath row]];
      resultTitle.text=@"Hello";
  
      NSURL *url = [NSURL URLWithString:[aResult objectForKey:@"url"]];
      NSData *data = [NSData dataWithContentsOfURL:url];
      cell.imageView.image = [UIImage imageWithData:data];
      cell.selectionStyle = UITableViewCellSelectionStyleNone;
      [theTableView reloadData];
  
      return cell;
  }
  </code></pre>
  
  <p>I've no idea what is wrong. I've used <code>tableviews</code> before and have compared this project to others to see if I've missed something, but I can't see any real differences.</p>