Vote count:
0
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 portfolio-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:@"portfolio-cell" forIndexPath:indexPath];
if (cell) {
// will eventually put labels etc here.
}
return cell;
}
asked 1 min ago
Aucun commentaire:
Enregistrer un commentaire