// 刷新列表信息
//static CGFloat const HeightHeadrView = 70.0;
+ (void)refreshTableView:(NSArray *)dataSource tabelview:(UITableView *)tableview message:(NSString *)message image:(NSString *)image {
if (!dataSource || 0 == dataSource.count) {
UIView *footView = InsertView(nil, CGRectMake(0, 0, tableview.width, kBodyHeight - AutoWHGetHeight(150.0)), nil);
UIImageView *nilShopImage = InsertImageView(footView, CGRectMake((tableview.width - AutoWHGetWidth(150.0)) / 2.0, AutoWHGetHeight(126.0), AutoWHGetWidth(150.0), AutoWHGetHeight(150.0)), [UIImage imageNamed:image]);
InsertLabel(footView, CGRectMake(0, nilShopImage.bottom + AutoWHGetHeight(20.0), tableview.width, AutoWHGetHeight(19.0)), NSTextAlignmentCenter, message, kFontSize16, kColorBlack, NO);
tableview.tableFooterView = footView;
} else {
tableview.tableFooterView = nil;
[DataHelper setExtraCellLineHidden:tableview];
}
[tableview reloadData];
}
+ (void)setExtraCellLineHidden:(UITableView *)tableView {
UIView *view =[[UIView alloc] init];
view.backgroundColor = [UIColor clearColor];
[tableView setTableFooterView:view];
}
网友评论