0
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSUInteger row=[indexPath row];
static NSString *CellIdentifier = @"prepaidvViewCustomCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
NSArray *nib= [[NSBundle mainBundle] loadNibNamed:@"prepaidvViewCustomCell" owner:self options:nil];
if([nib count]>0)
{
cell = self.customCell;
}
else
{
//cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil] autorelease];
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]autorelease];
}
}
lblprePaidName = (UILabel *)[cell.contentView viewWithTag:klblNameTag];
NSString *cellValue = [self.aryPrepaidName objectAtIndex:indexPath.row];
lblprePaidName.text = cellValue;
[cell.contentView addSubview:lblprePaidName];
NSString *temp = [aryimageName objectAtIndex:indexPath.row];
imageForSim.image= [UIImage imageNamed:temp];
[cell.contentView addSubview:imageForSim];
[cell.contentView addSubview:lblCallRates];
temp= [aryCallRates objectAtIndex:indexPath.row];
lblCallRates.text=temp;
return cell;
}
良いフォーマットはあなたの友人です –