Reload tableview section without scroll or animation

后端 未结 8 1228
轻奢々
轻奢々 2020-12-08 07:03

I am reloading a tableView section using this code -

self.tableView.beginUpdates()
self.tableView.reloadSections(NSIndexSet(index: 1), withRowAnimation: UITa         


        
8条回答
  •  借酒劲吻你
    2020-12-08 07:40

    Try this:

    UIView.setAnimationsEnabled(false)
    self.tableView.beginUpdates()
    self.tableView.reloadSections(NSIndexSet(index: 1) as IndexSet, with: UITableViewRowAnimation.none)
    self.tableView.endUpdates()
    

提交回复
热议问题