h_a86 h_a86 - 1 month ago 20
iOS Question

iOS Swift 3 tableview custom cell error

Hi I am trying to add a custom cell to tableview in swift3 but getting a strange error. Here is the screenshot of error.

enter image description here

Help plz!!!


Write indexPath in place of IndexPath like this:

let cell = tableview.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! CustomCell

Also, make sure that CustomCell is subclass of UITableViewCell.