因为未捕获到“NSUnknownKeyException”异常而终止应用程序, 原因是:“[setValue:forUndefinedKey:]:此类不符合键值编码关于按钮buttonOfFirstView的规定。”
我为什么会收到这个错误?我正在尝试通过XIB制作表格单元。在添加此代码后,它抛出上述异常。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"MyCell";
MyTableViewCell *cell = (MyTableViewCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *arrayCellXib = [[NSBundle mainBundle] loadNibNamed:@"MyTableViewCell"
owner:self
options:nil];
....
}
.....
return cell;
}
如何解决它?