I am trying to load a UITableViewController however i keep getting this error and my app crashes.
* Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2935.137/UITableView.m:5439 2014-04-15 00:40:55.244 TradingGame[966:60b]* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
Heres my code
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
if (cell) {
// will eventually put labels etc here.
}
return cell;
}
Here is where i call my UITableViewController to push to the screen:
if (indexPath.row == 1) {
Foo *foo = [[Foo alloc] init];
[self.navigationController pushViewController:foo animated:YES];
}
UITableView
from the storyboard and not some otherUITableView
– Paulw11