簡體   English   中英

UItableview 重新加載 animation [暫停]

[英]UItableview reload animation [on hold]

如何使用 animation 重新加載 tableview 當點擊像該圖像這樣的未接來電功能的片段時

將此添加到@IBAction 函數中以訪問未接來電段。 1)如果你想重新加載可見行的整個表格視圖,你可以使用這個:

   self.tableview.reloadData()

2)如果您想重新加載表格視圖中的特定行,那么您可以將其與動畫一起使用。 您可以使用不同的動畫。 我正在使用 .automatic 例如:

//creating indexpath for reloading row 1
let indexpath = IndexPath(row: 1, section: 0)
self.tableview.reloadRows(at: [indexpath], with: .automatic)

3)如果你想重新加載特定的部分,那么你可以使用這個:

self.tableview.reloadSections([1,2,3], with: .automatic)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM