更新时间:2022-12-28 16:18:17
问题是这一行:
self.timesheetTable.registerClass(TimesheetTableViewCell.self, forCellReuseIdentifier: "TimesheetCell")
删除它。该行说:不从故事板中获取单元格。但是你做想要从故事板中获取单元格。
Delete it. That line says: "Do not get the cell from the storyboard." But you do want to get the cell from the storyboard.
(但是,请确保单元格的标识符是故事板中的TimesheetCell
,否则你会崩溃。)
(Make sure, however, that the cell's identifier is "TimesheetCell"
in the storyboard, or you'll crash.)