Xcode unable to dequeue a cell with identifier Xcode unable to dequeue a cell with identifier xcode xcode

Xcode unable to dequeue a cell with identifier


Instead of:

 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

Try:

 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if this does not work then, also add:

  if (cell == nil) {    cell = [[customCell alloc] init];}


Ok, your problem is that you're using Static cells, instead of Prototype cells. Just change your UITableView Content type.

Prototype cells option


Ok, my project finally works. Some errors appeared about things I've deleted and I can't find anymore.

I've just deleted every TableViewCell I had to create a new unique UITableViewCell with the following properties :

class : customCell

Style : Basic (but it works also with Custom)

Identifier : Cell1

Thanks for your help ssantos, Abdullah Shafique and bilobatum.