我在故事板中自定义了我的表格视图单元格,以便在单元格中创建标签中心。
但似乎没有感情。
我的故事板是这样的:
实际上它是这样的:
我只在代码中设置标签文字,如下所示:
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Movie", for: indexPath) as! ArchiveTableViewCell
cell.showChineseTitle.text = chineseTitleArray[indexPath.row]
return cell
}
为什么?
提前致谢!!!