CollapsibleTableSectionViewController icon indicating copy to clipboard operation
CollapsibleTableSectionViewController copied to clipboard

How do i reload the whole table?

Open smarques84 opened this issue 8 years ago • 4 comments

I have the content for the CollapsibleTableSectionViewController coming from an API and i have tried using several methods like the following:

DispatchQueue.main.async{
       self.tableView.reloadData()
       self.tableView.reloadSectionIndexTitles()
       self.tableView.reloadSections(NSIndexSet(index: 1) as IndexSet, with: .automatic)
}

None of these methods calls the CollapsibleTableSectionDelegate methods to reload everything so how can i reload everything?

smarques84 avatar Sep 04 '17 09:09 smarques84

A hot fix would be to add the following to CollapsibleTableSectionViewController.swift.

open func reloadData() { _tableView.reloadData() }

From there, you can call it using

self.reloadData()

jerherrero avatar Apr 04 '18 05:04 jerherrero

can you explain more ??

mohmahdy93 avatar Apr 11 '18 21:04 mohmahdy93

seriously, how's _tableView not exposed to deriving classes dude??

galblank avatar Apr 25 '18 23:04 galblank

reloadData

I can't see reloadData function. Can you help?

bayfatih2000 avatar Jul 06 '20 09:07 bayfatih2000