我刚刚在我的故事板中添加了一个IBOutlet
,UIImageView
现在我的自定义TableViewCell
不再起作用了。
2012-08-13 13:30:28.052 Project[6189:fb03] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<TableViewController 0x808ab80> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageView.'
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CustomCell";
static NSString *CellNib = @"CustomCell";
CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:CellNib owner:self options:nil];
cell = (CustomCell *)[nib objectAtIndex:0];
}
...
}
有什么建议吗?