Skip to content

Instantly share code, notes, and snippets.

@jonlambert
Created January 20, 2013 11:28
Show Gist options
  • Save jonlambert/4578008 to your computer and use it in GitHub Desktop.
Save jonlambert/4578008 to your computer and use it in GitHub Desktop.
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.textLabel.text = @"foo";
return cell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment