I will just figure out how to add custom cells to a tableView in Swift. I watched a lot of tutorials and they all say at some point to use something like tableView.registerNib , which doesn't work for me!
This is the code I use in the tableViewController class:
var nib = UINib(nibName: "ViewExerciceCell", bundle: nil) tableView.registerNib(nib, forCellReuseIdentifier: "ExerciceCell")
When I try to build, an error appears in the second line:
Cannot call 'registerNib' using argument list of type '(UINib, forCellReuseIdentifier: String)'.
What can I do? All tutorials and other answers about custom cells use this code.
Thanks in advance
xcode uitableview swift cell
Nicolas meienberger
source share