Хорошо, у меня есть этот одноэлементный объект, и в нем есть массив, который должен быть показан в виде таблицы.
Дело в том, что он освобождает и после первого шоу я получаю EXC_BAD_ACCESS в cellForRowAtIndexPath
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [[dataBase shareddataBase].dateActive count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"celula"];
int i;
i=indexPath.row;
if (cell==nil) {
cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"celula"];
}
количество отправлено в освобожденный экземпляр CFArray .. в cellForRowAtIndexPath ..
Что освобождает это? Зачем?
он объявляется как NSMutableArray и имеет определенное свойство (nonatomic, retain) ..
if ((i<[[dataBase shareddataBase].dateActive count])&&(i>=0)) {
NSDictionary *d=[[dataBase shareddataBase].dateActive objectAtIndex:i];
cell.textLabel.text=[d objectForKey:@"detaliu"];
}
return cell;
}