enormego / EGOTableViewPullRefresh

A similar control to the pull down to refresh control created by atebits in Tweetie 2.
http://developers.enormego.com
3.26k stars 878 forks source link

Force a manual refresh #42

Open andsmi opened 12 years ago

andsmi commented 12 years ago

I'd like to force a refresh (espcially on the first load of the app) to indicate to the user that it is loading, as well as let them know about the "pull down to refresh" area (they will see it, and I believe "get the idea") -- I did this on my own with a method that does the scrolling, sets the state, and calls the reload, but is there a better way? Or should I just put my code up?

tito0224 commented 12 years ago

Hi andsmi,

I'm trying to accomplish the same thing. I would love to see you how you implemented it?

timhibbard commented 12 years ago

In the viewDidLoad event place this code:

if(!self.pullTableView.pullTableIsRefreshing) {
    self.pullTableView.pullTableIsRefreshing = YES;
    [self performSelector:@selector(refreshTable) withObject:nil afterDelay:1];
}

That will perform the refreshTable after a short delay so the user has a chance to see the table "pull down", see the "loading" text, then retract back up.