我有一个带有一些数据的 UITableView 单元格。
当我选择一个单元格时,我希望表格视图将我重定向到另一个视图。这就是我正在做的事情:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Multa *multa = [self.multas objectAtIndex:indexPath.row];
DetalheMultaViewController *form = [[DetalheMultaViewController alloc] initWithMulta:multa];
form.delegate = self;
[self.navigationController pushViewController:form animated:YES];
}
但是,当在最后一行出现此错误时:EXC_BAD_INSTRUCTION。
在控制台中我收到了这条消息(我明白在说什么,但不明白发生了什么):
2012-09-16 17:11:25.719 Multas Sociais[5092:11603] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<DetalheMultaViewController 0x7a46e10> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key fotoUrl.'
*** First throw call stack:
(0x1547052 0x1b0cd0a 0x1546f11 0xf2d032 0xe9ef7b 0xe9eeeb 0xeb9d60 0x7ac91a 0x1548e1a 0x14b2821 0x7ab46e 0x652e2c 0x6533a9 0x6535cb 0x652c1c 0x67956d 0x663d47 0x67a441 0x67a4f9 0x871c68 0x6314a1 0x63212b 0x8714c7 0x65a427 0x65a58c 0x65a5cc 0x3c2f 0x61d71d 0x61d952 0xea586d 0x151b966 0x151b407 0x147e7c0 0x147ddb4 0x147dccb 0x1f7a879 0x1f7a93e 0x58da9b 0x2608 0x2565)
terminate called throwing an exception(gdb)
想法?
非常感谢你。