I have a UITableView and I charged it with data in viewDidAppear. and it run successfully.
The Problem is I should refresh the data of the UITableView frequently (every 300 seconds). So I defined a timer and charged the UITableView's dataSource when the timer throws the event of finishing time interval (300 secs). BUT Nothing change !!! The data stills as it was.
Any help would be appreciated.
Sorry for my english.
Reloading a cell/row at an IndexPath is easy and all you need to use is the reloadRows(at:, with:) .
There are two main base ways to populate a tableview. The more popular is through Interface Building, using a prototype cell UI object. The other is strictly through code when you don't need a prototype cell from Interface Builder.
reloadData() :Reloads the rows and sections of the table view. Description : Call this method to reload all the data that is used to construct the table, including cells, section headers and footers, index arrays, and so on. For efficiency, the table view redisplays only those rows that are visible.
Try [tableView reloadData]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With