📜  dequeueReusableCellWithIdentifier 返回 nil - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:02.989000             🧑  作者: Mango

代码示例1
// You need to register the cell types with the tableview before it will return them
// Use either one of these depending on your setup

tableView.register(MyTableViewCell.self, forCellReuseIdentifier: "CellID1")
tableView.register(UINib(nibName: "yourNibName", bundle: nil), forCellReuseIdentifier: "CellID2")