2011-10-17 3 views

답변

3

색인 경로가 있기 때문에 어떤 셀인지 알 수 있습니다. 셀에 이미지가있는 이미지 뷰가 있음을 알고 계십니까? 그래서해야 할 일은 원하는 셀로 이미지를 변경하고 테이블 뷰를 업데이트하는 것입니다. 이 같은

뭔가 :

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    CustomCell *cell = (CustomCell*)[self tableView:tableView cellForRowAtIndexPath:indexPath]; 

    cell.myCustomImageView.image = myNewImage. 

    [myTableView reloadData]; 
} 
0

당신은 (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath를 사용하고 단지 내부의 이미지를 변경할 수 있습니다.

1

UITableViewCell에 selectedBackgroundView를 설정해보십시오.

+0

시도해 보았습니다. cell.selectedBackgroundView = [[UIImageView alloc] initWithImage : [UIImage imageNamed : @ "listBackgroundSelected.png"]]]; ...하지만 작동하지 않습니다 – cannyboy

+0

U는 tableview 셀의 contentView로 무엇을 했습니까? – Ilanchezhian