0
为什么在执行willSelectRowAtIndexPath之后以及在didSelectRowAtIndexPath之前生成EXC_BAD_ADRESS? 没有willSelectRowAtIndexPath实现它完美的作品。执行willSelectRowAtIndexPath之后生成EXC_BAD_ADRESS
这里是我的代码:
- (void)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
KMWTableViewCell *cell = (KMWTableViewCell *) [tableView cellForRowAtIndexPath:indexPath];
if(cell){
cell.visibleView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"cellBackPressed.png"]];
}
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
KMWTableViewCell *cell = (KMWTableViewCell *) [tableView cellForRowAtIndexPath:indexPath];
if(cell){
[self setCurrentAccountId:[[[KMWAppDelegate accounts] objectAtIndex:indexPath.section] objectForKey:@"accountId"]];
[self performSegueWithIdentifier:@"services" sender:self];
}
}
它在哪条线上崩溃? –
这些方法之间的某处。不在我的代码中。 –
'willSelectRowAtIndexPath:'应该返回'NSIndexPath'。 – Desdenova