I get this error while trying to load data into my cells using a custom cell:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSObject 0x8d61570> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key nextTimeLabel.'
I read some of the solutions here regarding this error. I know it is some issue with an deleted IBOutlet , so i did the following:
removed all connections and connected again with new views
deleted the xib file entirely and changed the names of the xib file and the subviews
I looked in the whole project(including the source file of the xib) for "nextTimeLabel" - nothing.
4.Quiting simulator/deleting the app/ clearing content
EDIT. code:
-(void)viewDidLoad
{
[super viewDidLoad];
UINib *nib = [UINib nibWithNibName:@"BNRCellView" bundle:nil];
[self.tableView registerNib:nib forCellReuseIdentifier:@"BNRCells"]; //lets try to change that later
}
#pragma mark - TableView Data source methods
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
BNRCell *cell = [tableView dequeueReusableCellWithIdentifier:@"BNRCells" ];
NSDictionary *dic = self.courses[indexPath.row];
cell.courseNameLabel.text= dic[@"title"];
return cell;
}
Any other suggestions?