[英]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.