Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to load a Custom TableViewCell in a TableView on Ipad?
    primarykey
    data
    text
    <p>First, sorry for my english, I'm french :)</p> <p>Like say in the title, I want to put a custom tableviewcell in a simple tableview on ipad. This is necessary because I want to generate a table with 5 labels.</p> <p>I use a separate <code>UITableViewCell</code> Class with a NIB.</p> <p>This is my code : </p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CellIdentifier"; CustomTableCell *cell = (CustomTableCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { [[NSBundle mainBundle] loadNibNamed:@"CustomTableCell" owner:self options:nil]; cell = customTableCell; self.customTableCell = nil; } cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; [self configureCell:cell atIndexPath:indexPath]; NSString *rowLabelEcheance = [[NSString alloc] initWithFormat:@"%@", [contentsList objectAtIndex:indexPath.row]]; [customTableCell.labelEcheance setText:rowLabelEcheance]; NSString *rowLabelCapitalRestantDu = [[NSString alloc] initWithFormat:@"%@", &gt;&gt;&gt;&gt;&gt;&gt;&gt; [contentsList2 objectAtIndex:indexPath.row]]; [customTableCell.labelCapitalRestantDu setText:rowLabelCapitalRestantDu]; NSString *rowLabelInterets = [[NSString alloc] initWithFormat:@"%@", [contentsList3 objectAtIndex:indexPath.row]]; [customTableCell.labelInterets setText:rowLabelInterets]; NSString *rowLabelAmortissement = [[NSString alloc] initWithFormat:@"%@", &gt;[contentsList4 objectAtIndex:indexPath.row]]; [customTableCell.labelAmortissement setText:rowLabelAmortissement]; NSString *rowLabelMontant = [[NSString alloc] initWithFormat:@"%@", [contentsList5 objectAtIndex:indexPath.row]]; [customTableCell.labelMontant setText:rowLabelMontant]; return cell; } </code></pre> <p>Can you help me ? I spend 8 hours of work for this problem....</p> <p>Thank you ! </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload