Я не уверен, где ошибка здесь, посмотрев другие подобные проблемы. Я получил отказ от утверждения.
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:
Я думаю, что это что-то простое, но надеюсь, что кто-то может помочь.
Ниже мой код:
#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;
}