为了方便使用巨人的轮子,稍微封装了下MJRefresh,两句代码就可以完成刷新,也可以自定义刷新头,并且把页数控制封装了起来,自己就不用记录页数了
#import "UIScrollView+MJRefreshEX.h"
<MJRefreshEXDelegate>
[self.tableView addHeaderWithHeaderClass:nil beginRefresh:YES delegate:self animation:YES];
[self.tableView addFooterWithFooterClass:nil automaticallyRefresh:YES delegate:self];
- (void)onRefreshing:(id)control {}
- (void)onLoadingMoreData:(id)control pageNum:(NSNumber *)pageNum {}