下拉获取数据成功后在移除数组中的元素
[JzZNetworkManager loadDataByString:FootPrintHistory httpHeaderFieldDic:nil parameters:paremeters withType:OTHER_TYPE success:^(id responseObject) {
if ([responseObject[@"statusCode"] integerValue] == 0) {
[self.historyArray removeAllObjects];
NSArray *array = responseObject[@"list"];
if (array.count != 0) {
for (NSDictionary *dic in array) {
MRFootPrint *model = [[MRFootPrint alloc] initWithDic:dic];
[self.historyArray addObject:model];
}
}
[_tableView.mj_header endRefreshing];
[self.tableView reloadData];
}else{
[_tableView.mj_header endRefreshing];
}
}
} failure:^(NSError *error) {
NSLog(@"--------error------> %@",error);
[_tableView.mj_header endRefreshing];
}];
网友评论