Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh data in UITableView

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.

like image 602
kassar Avatar asked Jun 23 '10 13:06

kassar


People also ask

How do you reload a particular cell in UITableView Swift?

Reloading a cell/row at an IndexPath is easy and all you need to use is the reloadRows(at:, with:) .

How do I populate UITableView?

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.

What does reload data do?

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.


1 Answers

Try [tableView reloadData]

like image 109
Gary Avatar answered Oct 06 '22 01:10

Gary