![](/img/trans.png)
[英]Reload tableView section without reloading header section - Swift
[英]Reload header in section without reloading section rows in swift
我试图重新加载UITableView
节标题,而不是重新加载整个节的行,因为我UITextfield
中有一个UITextfield
,当我调用tableview reloadSection
s时,它会清除文本字段值。
您可以使用,
tableView.beginUpdates()
tableView.endUpdates()
let sectionIndex = IndexSet(integer: 0)
self.tableView.reloadSections(sectionIndex, with: .none)
您可以使用此代码重新加载tableview。 您不需要重新加载标题即可显示项目
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.