Tommy K
Tommy K

Reputation: 1807

unable to dequeue a cell with identifier - set Identifier & class in storyboard

I have a tableView with its class set to TableViewController. In storyboard, I click on the cell and set it to the class MyCell. Also in storyboard, I set the identifier to "MyCell". I then copy & paste that into

let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell", for: indexPath) as! MyCell

What step did I miss? I triple checked that the Identifier string is exactly the same. The tableView and cell are set to the correct classes.

Upvotes: 0

Views: 51

Answers (1)

Tommy K
Tommy K

Reputation: 1807

Solution was deleting the , for: indexPath part.

Upvotes: 1

Related Questions