KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm not sure where the error is here, having looked at other similar issues. I received an Assertion failure. Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath: I think it is something simple but hope someone can help. Below is my code: #import "StockMarketViewController.h" @interface StockMarketViewController () @end @implementation StockMarketViewController @synthesize ShareNameText, ShareValueText, AmountText; @synthesize shares, shareValues; - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section; { return [shares count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; { UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; NSString *currentValue = [shareValues objectAtIndex:[indexPath row]]; [[cell textLabel]setText:currentValue]; return cell; }
Tags (comma-separated)
Save Edits
Cancel