:jQuery과 셀 accessoryView 이미지 문제
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TopicCell"];
GPBTopic *topic = [self.topics.list objectAtIndex:indexPath.row];
cell.textLabel.text= topic.name;
if ((indexPath.row == 5) || (indexPath.row == 9))
{
cell.accessoryView = [[ UIImageView alloc ] initWithImage:[UIImage imageNamed:@"lock_icon.png"]];;
[cell.accessoryView setFrame:CGRectMake(0, 0, 24, 24)];
}
return cell;
}
나는 재미있는 결과를 얻고을 - 자물쇠는 처음 행 5에 표시됩니다 , 9하지만 목록을 아래로 스크롤하면 다른 셀의 accessoryView에서도 아이콘이 무작위로 다시 표시됩니다 (단 1 섹션 btw 만 있음). 스크롤이 꽤 번쩍 거리고 뒤죽박죽이됩니다. 위아래로 스크롤하면됩니다. 더 많은 인스턴스가 표시됩니다! 왜? 여기에 버그가 어디 있니?
도움, 감사합니다!
, 난 당신이 내가 그렇게 어떻게 행 5, 9 –
에 대해 다른 CellReuseIdentifier를 사용한다고 생각? – mindbomb