어리석은 질문 일 수 있습니다.사용자 지정 UITableview에서 셀 선택시 데이터를 검색하는 방법
여러 개의 셀이있는 UITableview가 있습니다. 각 셀에 일부 데이터가 표시됩니다. 데이터를 표시하는 데 셀의 텍스트 속성을 사용하지 않습니다. 대신 텍스트를 표시하는 셀에 맞춤 레이블이 있습니다. 내 질문 : 셀을 클릭하면 셀에서 데이터를 검색해야합니다. 어떻게해야합니까? -tableView:didSelectRowAtIndexPath:
방법에서
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
UILabel *CellTextlabel = [[UILabel alloc] init];
CellTextlabel.tag = 222;
[CellTextlabel setFrame:CGRectMake(40, 5, 200, 20)];
[cell.contentView addSubview:CellTextlabel];
[CellTextlabel release];
}
UILabel *editCellTextlabel = (UILabel *)[cell.contentView viewWithTag:222];
editCellTextlabel.font = [UIFont boldSystemFontOfSize:18];
editCellTextlabel.text = contact.lastName;
셀을 채우기 위해 사용하는 코드를 게시하십시오. –