0
iOS Projetct에서 UItableView를 재미있게 사용하고 있지만 정상적으로 작동하지만 충돌시 음성을 켜면이 코드가 null 셀을 반환하는 것으로 보입니다. 당신이 내 코드와 함께 문제를 볼 수 있습니까 :음성 해설시 크래시 테이블보기
-(UITableViewCell*) cellForIndexPath:(NSIndexPath*) indexPath inTableView:(UITableView*) tableView {
static NSString *CellIdentifier = @"TocCellView";
UITableViewCell* cell =(UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
// Use apple technic explained here : http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html
[[NSBundle mainBundle] loadNibNamed:@"TocCellView" owner:self options:nil];
cell = self.tableViewCell;
cell.layer.masksToBounds = YES;
}
if ([GraphicHelper isiPad]) {
[self fillIPadCell:cell withBookPage:[self pageCorrespondingToIndex:indexPath] section:indexPath.section];
}
else {
BOOL isEvenCell = (indexPath.row%2);
BOOL isEvenHeader = (indexPath.section%2);
[self fillIPhoneCell:cell withBookPage:[self pageCorrespondingToIndex:indexPath] forEvenCell:isEvenCell inEvenHeader:isEvenHeader];
}
return cell;
}
답장을 보내 주셔서 감사합니다.하지만 문제는 내가 음성을 활성화하지 않았을 때 충돌이없고 작동하는 것입니다. – samir
당신은 NULL 셀이 반환 된 결과로 충돌이 발생했다고 말했고, 실제로 그렇다면 이미 검색 범위를 좁혔습니다. 지금 현재 로선 문제가 셀에 대기 중인지 또는 펜촉에서로드되었는지 여부는 알 수 없습니다. – Brian