은 내가 아래 그림과 같은 테이블보기를 "사용자 행을 선택할 때이 그림을 변경해야"하지만 난마르크 및 jQuery과 셀 해제 상자
당신이 사전에 나에게
감사 도와주세요 것입니다 방법을 모르는 :이 방법 didSelectRowAtIndexPath를 사용해야!
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *key = [[self sectionKeys] objectAtIndex:[indexPath section]];
NSArray *contents = [[self sectionContents] objectForKey:key];
NSString *contentForThisRow = [contents objectAtIndex:[indexPath row]];
if (indexPath.section != 2) {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
cell.textLabel.text =contentForThisRow;
return cell;
}
else {
CheckBoxCompensationViewCell *cell = (CheckBoxCompensationViewCell*)[tableView
dequeueReusableCellWithIdentifier:@"CheckBoxCompensationViewCell"];
cell.imageView.image=[UIImage imageNamed:@"emptycheck-box.png"];
cell.checkBox.image = image;
if(indexPath.row == 0){
cell.compensationText.text [email protected]"Red";
}
else if (indexPath.row == 1){
cell.compensationText.text [email protected]"Green";
}else if(indexPath.row == 2){
cell.compensationText.text [email protected]"Blue";
}
return cell;
}
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// I don't know what should I have here , probably mark box image but I don't know how
}
(12) 감사하지만 나는 한 당신이 indexPath이 현재 선택되어있는 나타내는 속성을 가질 필요가 –
선택의 제한이 수있는 방법을 알고, 난 당신이 – wattson12
12 내 업데이트 된 대답을 참조 I 그걸 보았다. –