开发者

Issue with EGOTableViewPullRefresh

开发者 https://www.devze.com 2023-03-28 10:09 出处:网络
When I use the EGOTableViewPullRefresh just like its demo - (void)reloadTableViewDataSource { _reloading = YES;

When I use the EGOTableViewPullRefresh just like its demo

- (void)reloadTableViewDataSource
{
      _reloading = YES;
      sleep(10);//something just like reload the data,here is a simple example
}

- (void)egoRefreshTableHeaderDidTriggerRefresh:(EGORefreshTableHeaderView*)view
{
      [self reloadTableViewDataSource];
      [self performSelector:@selector(doneLoadingTableViewData) withObject:nil afterDelay:0.0];
}

There's a problem where it doesn't change state to EGOOPullRefreshLoading when sleep(10),so there still is the arrow down and the title is "Pull down to refresh " when reload data.

How can I resolve the proble开发者_JS百科m?


I had the same problem, because in their demo app says that something like reloading the data should be put in - (void)reloadTableViewDataSource, but instead I tried to put that inside - (void)egoRefreshTableHeaderDidTriggerRefresh:(EGORefreshTableHeaderView*)view & everything work perfect.

So my advice would be to put sleep(10); before [self reloadTableViewDataSource];

0

精彩评论

暂无评论...
验证码 换一张
取 消