I already read and saw some videos about this subject but i can\'t get this to work. Im trying to a cell from a xib instead of the storyboard.
This is my ViewController
You need to register your nib object.
In viewDidLoad():
viewDidLoad()
let nib = UINib(nibName: "nameOfYourNibFile", bundle: nil) tableView.register(nib, forCellReuseIdentifier: "yourIdentifier")
You also need to return the number of sections:
func numberOfSections(in tableView: UITableView) -> Int { return 1 }