Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions Classes/PullRefreshTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,18 @@ - (void)stopLoadingComplete:(NSString *)animationID finished:(NSNumber *)finishe
}

- (void)refresh {
// This is just a demo. Override this method with your custom reload action.
// Don't forget to call stopLoading at the end.
[self performSelector:@selector(stopLoading) withObject:nil afterDelay:2.0];
[NSThread detachNewThreadSelector:@selector(refreshStep2) toTarget:self withObject:nil];
}
- (void)refreshStep2 {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self tablePullRefresh];
[self performSelectorOnMainThread:@selector(stopLoading) withObject:nil waitUntilDone:YES];
[pool release];
}
- (void)tablePullRefresh {
// This is just a demo. Override this method with your custom reload action.
sleep(2);
}

- (void)dealloc {
[refreshHeaderView release];
[refreshLabel release];
Expand Down