나는 프로토 타입 셀을 기존 테이블 뷰로 드래그해야하는 새 프로젝트를 가지고 있습니다.빈 프로토 타입 셀
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"myCustomCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
// Configure the cell...
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
UILabel *nameLabel = (UILabel *)[cell viewWithTag:11];
: 그때
- 는
- 는
이 다음 내있는 tableview 위임에 내가 대리인 콜백을 얻을 셀에 대한 식별자를 설정 적절한 태그 프로토 타입 셀에 일부 레이블을 추가
그 이름이 표시됩니다. 라벨은 무효입니다. 두 번 확인하고 세 번 반복 태그와 재사용이 가능한 식별자를 확인했습니다. 스토리 보드에서, 나는 tableview가 내 라벨을 보여주는 contentView와 함께 그 셀로 프로 타입 셀을 가지고 있다는 것을 알았다. 내가 뭘 놓치고 있니?