UITableView에서 사용자 지정 셀에 값을 설정하려고합니다. 그러나 내가 그것을보고있을 때 아무런 오류가 없지만 UILabel에 나의 가치가 정해지지 않았다!Iphone - 사용자 지정 셀 - UILabel을 설정할 수 없습니다.
및 아이디어?
되는 사용자 정의 셀 : 내 jQuery과에
@interface InscriptionCustomCell : UITableViewCell {
IBOutlet UILabel *titreCell;
IBOutlet UITextField *contenuCell;
}
보기 :
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"InscriptionCustomCell";
InscriptionCustomCell *cell = (InscriptionCustomCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"InscriptionCustomCell" owner:self options:nil];
for (id currentObject in topLevelObjects){
if ([currentObject isKindOfClass:[UITableViewCell class]]){
cell = (InscriptionCustomCell *) currentObject;
break;
}
}
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if(indexPath.section == 0)
{
[cell.titreCell setText:[model.listModuleInfoPerso objectAtIndex:indexPath.row]];
[cell.contenuCell setPlaceholder:[model.listModuleInfoPerso objectAtIndex:indexPath.row]];
}else {
[cell.titreCell setText:[model.listModuleInfoSupp objectAtIndex:indexPath.row]];
[cell.contenuCell setPlaceholder:[model.listModuleInfoSupp objectAtIndex:indexPath.row]];
}
return cell;
은} pratikshabhisikar처럼
왜 휴식이 있습니까? –
레이블이 펜촉에서 적절한 콘센트에 연결되어 있는지 확인하십시오. –