Nat*_*han 0 iphone crash objective-c uitableview
嘿伙计们,我是Objective-C的新手,而且我正在创建一个应用程序,当你点击一个表格单元格时,它会按照它应该做的,但是当你第二次回到并点击单元格时,它就会与"EXC_BAD_ACCESS"崩溃.你能告诉我它意味着什么,为什么它只是第二次崩溃,我怎么能解决它?我很确定它在这个功能中:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Navigation logic may go here. Create and push another view controller.
RaceData * data = [self.units objectAtIndex:indexPath.row];
ProtossInfo * info = [[ProtossInfo alloc] initWithNibName:@"ProtossInfo" bundle:nil];
// ...
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:info animated:YES];
info.title = data.titler;
info.minerals.text = data.min;
info.vespene.text = data.vesp;
info.supply.text = data.sup;
info.portrait.image = data.porty;
[info release];
[data release];
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
218 次 |
最近记录: |