标签:
//刷新控件
- (void)setUpRefreshControl{
MJRefreshHeaderView *header = [MJRefreshHeaderView header];
header.scrollView = self.tableView;
header.delegate = self;
self.header = header;
MJRefreshFooterView *footer = [MJRefreshFooterView footer];
footer.scrollView = self.tableView;
footer.delegate = self;
self.footer = footer;
}
- (void)dealloc{
[_header free];
[_footer free];
}
//代理方法
- (void)refreshViewBeginRefreshing:(MJRefreshBaseView *)refreshView{
if ([refreshView isKindOfClass:[MJRefreshFooterView class]]) {
[self loadMoreData];
}
else{
[self loadNewData];
}
}
[self.header endRefreshing];
标签:
原文地址:http://www.cnblogs.com/yintingting/p/4552411.html