Reputation: 137
I got a UITableViewController
and the data of the list is get from the server.
Supporting scroll down to refresh data.
My question is when view did load. I don't want user use finger to pull it down get the data, but UITableView
scroll down itself automatically and get data from server.
Edit:
Sorry, my question is there is a method named pullDownToRefresh
, for example. If user use finger to pull down the tableView
, the function is triggered. And now, I want to make tableview
pull down by itself, and trigger the function automatically.
I also need to make tableView
scrolls down. I tried beginRefreshing
, but the tableView
is not really scrolls down.
Upvotes: 4
Views: 5219
Reputation: 124
If I understand your question correctly, you need to programatically display the refresh control(without finger swipe) and reload your tableView.
UIRefreshControl's "beginRefreshing" method serves your purpose.
More at this link :link
Upvotes: 4