Good day. There is a project in Objective c. There is a controller with the tableView element and there is a tableViewCell class (in which there are two labels), from which I take a cell for the tableView. And all this works fine until I announce links for any label. The application crashes with the following error:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[setValue: forUndefinedKey:]:
I announce the connection through file's owner.
Link declaration code in tableViewCell header:
@interface CafeCell:UITableViewCell @property (weak, nonatomic) IBOutlet UILabel *lbl_CafeName; @end Table build code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CafeCell"; CafeCell* cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell==nil){ cell = [[[NSBundle mainBundle] loadNibNamed:CellIdentifier owner:self options:nil] objectAtIndex:0];//падает здесь } return cell; }