您好,我正在尝试使用tableview
及其单元格
制作下拉菜单
我使用默认的tableview
cell
作为菜单,使用自定义单元格作为内容
自定义单元格具有CollectionView
,并且CollectionView
具有其单元格
下拉和向上工作正常,但有像这样的残像
这是我选择菜单标题单元格(默认单元格)时的代码
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
if indexPath.row == 0 {
sectionDatas[indexPath.section].isOpended = sectionDatas[indexPath.section].isOpended ? false : true
let sections = IndexSet(integer: indexPath.section)
tableView.reloadSections(sections, with: .none)
}
}
有没有办法消除残影
最佳答案
尝试为 Collection View 设置clipToBounds = true或IsHidden - true/false(对于 Collection View )
关于ios - 在 iOS 中重新加载 tableview 部分时出现残像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49952463/