iOS: UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:
===

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 [this][1] question the cell's value is null. I've set the delegate and datasource of the table correctly and I can't see where this is going wrong. 

If I set the return value of the following method to 0, no error occurs because the cellForRowAtIndexPath 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 NSArray and checked that its populated (although that shouldn't matter I guess) and basically what is meant to happen is I press a button that searches and then places the results in the table. So before this the tableview is empty.

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
        return 1;
    }


Here's the cellForRowAtIndexPath method itself. I've tried just using the basic template method too, which still throws the same error.


        - (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;
    }

I've no idea what is wrong. I've used tableviews before and have compared this project to others to see if I've missed something, but I can't see any real differences.


  [1]: http://stackoverflow.com/questions/11290746/uitableview-datasource-must-return-a-cell-from-tableviewcellforrowatindexpath