1.//刷新数据
#import "MJRefresh.h"
- (void)viewDidLoad {
mainView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
[self performSelector:@selector(refreshData) withObject:nil afterDelay:3];
}];
mainView.footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
}];
}
2.
-(void)refreshData
{
DeviceListLogic *logic = [[DeviceListLogic alloc] init];
[logic requestWithSuccess:^{
[mainView reloadData];
[mainView.header endRefreshing];
}];
}