我有一个关于使用的问题EGORefreshTableHeaderView
:
如果我使用这段代码,没关系:
- (void)egoRefreshTableHeaderDidTriggerRefresh:(EGORefreshTableHeaderView *)view
{
_reloading = YES;
[self performSelector:@selector(refreshData) withObject:nil afterDelay:0.1f];
}
- (void)refreshData
{
_reloading = NO;
[self.dataSourceArr removeAllObjects];
[self.dataSourceArr addNewData];
[self.egoHeaderView egoRefreshScrollViewDataSourceDidFinishedLoading:self.mainTableView];
[self.mainTableView reloadData];
}
但是,当我使用此代码时,它EGOrefreshHeaderView
会一直显示在mainTableView
顶部,它不会隐藏:
- (void)egoRefreshTableHeaderDidTriggerRefresh:(EGORefreshTableHeaderView *)view
{
_reloading = YES;
[self refreshData];
}
- (void)refreshData
{
_reloading = NO;
[self.dataSourceArr removeAllObjects];
[self.dataSourceArr addNewData];
[self.egoHeaderView egoRefreshScrollViewDataSourceDidFinishedLoading:self.mainTableView];
[self.mainTableView reloadData];
}