开发者

EGOTableViewPullRefresh - how to use it?

开发者 https://www.devze.com 2023-02-25 09:06 出处:网络
How embarrasing indeed, but I am unable to work out how to install or implement EGO开发者_运维知识库TableViewPullRefresh.I really would appreciate a push in the right direction.

How embarrasing indeed, but I am unable to work out how to install or implement EGO开发者_运维知识库TableViewPullRefresh. I really would appreciate a push in the right direction.

I have downloaded the source, and I've included it in my project.

In my view controller class I have replaced : UITableView with : EGORefreshTableHeaderView - but that's giving all sorts of problems.

I searched for several hours on Google, and read all the related topics here.

I am missing something fundamental because I also wasn't able to install the JSON stuff I got on github either. So I really would appreciate the help - which I could use for these kinds of things in the future.

Thanks a lot.


This is easy. Copy EGOTableViewPullRefresh folder to your project, add EGORefreshTableHeaderDelegate delegate to your viewcontrollerclass.h and implement the following methods:

- (void)reloadTableViewDataSource
- (void)doneLoadingTableViewData
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
- (void)egoRefreshTableHeaderDidTriggerRefresh:(EGORefreshTableHeaderView*)view
- (BOOL)egoRefreshTableHeaderDataSourceIsLoading:(EGORefreshTableHeaderView*)view


Else try this one.. https://github.com/leah/PullToRefresh

Easy to use just insert the classes to your project and change your interface file of the corresponding class like this:

@interface news : PullRefreshTableViewController

Good luck!

0

精彩评论

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

关注公众号