Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It looks to me that you have a partially visible switch case where it is returning a cell for case 1. Your error makes me think you are returning a null <code>UITableViewCell</code> some branch in your switch case.</p> <p>Make sure all paths out of that switch case return a valid <code>UITableViewCell</code> object.</p> <p>What are you returning for case 0? In other words, what are you returning for the first row that the UITableView requests?</p> <p>Here is a sample of code from one of my projects, It might give you a good starting point to see where you are going wrong:</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } NSInteger section = [indexPath section]; switch (section) { case 0: // First cell in section 1 cell.textLabel.text = [collectionHelpTitles objectAtIndex:[indexPath row]]; break; case 1: // Second cell in section 1 cell.textLabel.text = [noteHelpTitles objectAtIndex:[indexPath row]]; break; case 2: // Third cell in section 1 cell.textLabel.text = [checklistHelpTitles objectAtIndex:[indexPath row]]; break; case 3: // Fourth cell in section 1 cell.textLabel.text = [photoHelpTitles objectAtIndex:[indexPath row]]; break; default: // Do something else here if a cell other than 1,2,3 or 4 is requested break; } return cell; } </code></pre>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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