У меня есть NSmutablearray после того, как я прочитал данные из него, я не могу снова прочитать те же данные (индекс)
Ошибка: «EXC_BAD_ACCESS»
в интерфейсе
NSMutableArray *ticketList;
@property (nonatomic, retain) NSMutableArray *ticketList;
присвоение значения
self.ticketList = [NSMutableArray arrayWithArray:[results objectForKey:@"tickets"]];
чтение значения
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"ticketCell";
ticketCell *cell = (ticketCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
[self.cellNib instantiateWithOwner:self options:nil];
cell = tmpCell;
self.tmpCell = nil;
}
else {
// Nothing to do here. Because in either way we change the values of the cell later.
}
cell.useDarkBackground = (indexPath.row % 2 == 0);
// Configure the data for the cell.
int rowID = indexPath.row;
NSDictionary *currentTicket = [ticketList objectAtIndex:(int)(indexPath.row)];
NSString *tikid = [currentTicket objectForKey:@"number"];
cell.ticketID = [currentTicket objectForKey:@"number"];
cell.ticketStatus = [currentTicket objectForKey:@"status"];
cell.ticketOpenDate = [currentTicket objectForKey:@"oDate"];
cell.ticketEndDate = [currentTicket objectForKey:@"eDate"];
cell.ticketCategory = [currentTicket objectForKey:@"category"];
cell.ticketPriority = [currentTicket objectForKey:@"priority"];
cell.ticketInfo = [currentTicket objectForKey:@"info"];
return cell;
}