Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EGOTableViewPullRefresh - Simulate a pull down on viewDidLoad

I am using EGOTableViewPullRefresh for atable view in my app and it works great. However I would like to be able to have the pull down effect happen on the viewDidAppear for the first load of the screen.

Is there an easy way to simulate the user scrolling the UITableView or to force EGOTableViewPullRefresh to show itself?

like image 458
Mike Valstar Avatar asked Jun 22 '11 17:06

Mike Valstar


1 Answers

This should accomplish what you want, it adds an inset then tells EGO that scrolling just completed. EGO will remove the inset when its finished.

myUITableView.contentInset = UIEdgeInsetsMake(66.0f, 0.0f, 0.0f, 0.0f);
[_refreshHeaderView egoRefreshScrollViewDidEndDragging: myUITableView];
like image 130
anvk Avatar answered Nov 15 '22 00:11

anvk