你试过用egoRefreshScrollViewDataSourceStartManualLoading
吗?
假设您的EGORefreshTableHeaderView
实例名为 _refreshTableHeaderView,则调用如下:
[_refreshTableHeaderView egoRefreshScrollViewDataSourceStartManualLoading:self.tableView];
为我工作...
所以,我已经太久没有使用它了,我忘记了我自己应用了更改......
我修改EGORefreshTableHeaderDelegate
(在 中声明EGORefreshTableHeaderView.h
)以添加此附加协议:
- (void)egoRefreshScrollViewDataSourceStartManualLoading:(UIScrollView *)scrollView;
和实现(in EGORefreshTableHeaderView.m
):
- (void)egoRefreshScrollViewDataSourceStartManualLoading:(UIScrollView *)scrollView {
[self setState:EGOOPullRefreshLoading];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.2];
scrollView.contentInset = UIEdgeInsetsMake(60.0f, 0.0f, 0.0f, 0.0f);
[UIView commitAnimations];
if ([_delegate respondsToSelector:@selector(egoRefreshTableHeaderDidTriggerRefresh:)]) {
[_delegate egoRefreshTableHeaderDidTriggerRefresh:self];
}
}
如果您需要更多帮助,请告诉我。
(感谢enormego的出色工作!)