我设置了一个桌面视图,这样当一个单元格被touch 时,它会在高度上扩展以显示更多信息.tableView有5个部分.
我有一个错误:当一个细胞inflating 时,该细胞下面的所有头细胞都不可见.控制台输出以下内容:"[31233:564745]没有被重用的表单元格的索引路径"
在我的故事板中,我有两个自定义单元格:"myCell"
个用于数据承载单元格,"headerCell"
个用于标题.
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let thisGoal : GoalModel = goalArray[indexPath.section][indexPath.row]
if self.currentPath != nil && self.currentPath == indexPath {
self.currentPath = nil
} else {
self.currentPath = indexPath
}
tableView.beginUpdates()
tableView.endUpdates()
}
如果我在开始/结束更新之间输入tableView.reloadData()
,它将正常工作,尽管标题背景变为黑色,并丢失动画.
我已经在:func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView?
中声明了标题的所有内容
我错过了什么?我真的希望tableView仍然有动画,并保留clearColor()
个背景.
提前谢谢.我确实通读了客观C的答案,但没能让它们对我有用.我真的很感谢你的迅速帮助.
我认为问题在于,表单元没有索引路径可供重用.