Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS 5 Storyboard Custom Cell Crash: UITableView dataSource must return a cell
    primarykey
    data
    text
    <p>This is either an XCode bug, or me missing a crucial rule here. </p> <p><strong>Update:</strong> - What's the chance of this being a weird bug in XCode/Storyboard?</p> <p><strong>Situation:</strong></p> <ul> <li>iOS 5, Storyboard</li> <li>This is the storyboard setup: <a href="https://i.imgur.com/T5WyD.png" rel="noreferrer">http://i.imgur.com/T5WyD.png</a></li> <li>Another screenshot of the full setup: <a href="https://i.imgur.com/1tVuz.png" rel="noreferrer">http://i.imgur.com/1tVuz.png</a></li> <li>TableViewController with Custom Cell, cell has reusable identifier "NewCell"</li> <li><p>in "cellForRowAtIndexPath" I basically have:</p> <p><code>UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"NewCell"]; return cell; </code></p></li> <li><p>This throws an exception: </p> <p><code>Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'</code></p></li> </ul> <p><strong>Things I have already tried:</strong></p> <ul> <li>I setup a new project from scratch, TabBarController, with a TableViewController and a Custom Cell, all wired up in Storyboard, set a reusable cell identifier. Used the same code as above, <strong>worked perfectly</strong>. I don't know why it didn't work with the storyboard above...</li> </ul> <p>I have a feeling it has something to do with the tree I built there, which is a TabBarController, loading a NavigationController, loading a TableViewController, providing a few items, one is clicked, which loads another TableViewController, which is unable to work with the custom cell, somehow.</p> <p><strong>Important:</strong> - The issue is that the Storyboard should make sure that: <code>UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"NewCell"];</code> will never return NIL (unlike without the Storyboard/iOS4). But, mine is nil. And I can't, for the hell of it, figure out what's happening.</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