草庐IT

historyEntry

全部标签

ios - 显示不正确值的自定义 UITableViewCell

我有一个UITableViewController显示带有一些标签的自定义单元格和一个自定义UIView。在tableView(_tableView:UITableView,cellForRowAtindexPath:IndexPath)方法中,当单元格被重用时,颜色似乎没有被重置(它们看起来完全随机)。我该如何解决这个问题?overridefunctableView(_tableView:UITableView,cellForRowAtindexPath:IndexPath)->UITableViewCell{lethistoryEntry=allHistoryEntries[ind