0
Почему EXC_BAD_ADRESS сгенерирован после выполнения команды willSelectRowAtIndexPath и до того, как был сделанSelectRowAtIndexPath ?? Без реализации willSelectRowAtIndexPath он отлично работает.EXC_BAD_ADRESS сгенерирован после выполнения команды willSelectRowAtIndexPath
Вот мой код:
- (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