Note that there are some explanatory texts on larger screens.

plurals
  1. POUITableView Custom Cells Not Showing Up
    primarykey
    data
    text
    <p>I have a UITableViewController with two IBOutlet's to two different UITableViewCell's that were made in IB. However they are not showing up in the tableView. If you can find the error, I will really appreciate it.</p> <pre><code> - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *categoryIdentifier = @"Category"; static NSString *songDetailsCellIdentifier = @"sdci"; static NSString *socialCellIdentifier = @"sdcssi"; static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } switch (indexPath.row) { case 0: //imageView = [[UIImage alloc] initWithData:imageData]; //songNameLabel.text = songName; //artistNameLabel.text = artistName; //albumNameLabel.text = albumName; //numberInChartsLabel.text = [[NSString alloc] initWithFormat:@"%d", numberInCharts]; break; case 1: cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:categoryIdentifier] autorelease]; cell.textLabel.text = [[NSString alloc] initWithFormat:@"Category"]; cell.detailTextLabel.text = [[NSString alloc] initWithFormat:@"%@", category]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; break; case 2: cell.textLabel.text = [[NSString alloc] initWithFormat:@"Preview This Track"]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; break; case 3: cell.textLabel.text = [[NSString alloc] initWithFormat:@"View This Song In iTunes"]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; break; case 4: cell.textLabel.text = [[NSString alloc] initWithFormat:@"View Artist In iTunes"]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; break; case 5: break; } // Configure the cell... if (indexPath.row == 0) { songDetailsCell = [[[UITableViewCell alloc] initWithFrame:songDetailsCell.frame reuseIdentifier:songDetailsCellIdentifier] autorelease]; return songDetailsCell; } if (indexPath.row == 5) { socialCell = [[[UITableViewCell alloc] initWithFrame:socialCell.frame reuseIdentifier:socialCellIdentifier] autorelease]; return socialCell; </pre> <p>} else if (indexPath.row >= 1 &amp;&amp; indexPath.row &lt;=5) { return cell; } return nil; }</code></p>
    singulars
    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.
    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