| tableView | |
|
self.tableView.sectionHeaderHeight = [UIFont systemFontOfSize:16].lineHeight; |
表组 表头行高 |
|
//-- 设置为制动设置行高 self.tableView.rowHeight = UITableViewAutomaticDimension; //--预估行高 self.tableView.estimatedRowHeight = 100; |
自动设置行高 |
|
// xib 注册 [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([XMGCommentCell class]) bundle:nil] forCellReuseIdentifier:XMGCommentCellId]; //获取 xib 注册的 cell XMGCommentCell *cell = [tableView dequeueReusableCellWithIdentifier:XMGCommentCellId]; |
xib 注册 |
|
//注册 表头 表脚 [self.tableView registerClass:[XMGCommentHeaderView class] forHeaderFooterViewReuseIdentifier:XMGHeaderId]; |
注册 表头 表脚 |
| // 设置header
self.tableView.tableHeaderView = headerView; |
|
| // 刷新表格
[self.tableView reloadData]; |
刷新表格 |
| UITableViewDelegate | |
| //组表头视图
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{return null;} |
组表头视图 |
| //设置表行高
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{return null;} |
设置表行高 |