Use a UITableView as other tableView.talbeHeaderView

71 Views Asked by At

I use a tableView(named tableViewTwo) as other tableView.talbeHeaderView

The tableViewTwo cant scroll

Why and What can I do

UIView *view1 = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 12)];
view1.backgroundColor = GL_TABLEVIEW_BACKGROUD_COLOR;

UIView *tableHeaderView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, CGRectGetMaxY(self.lineGroupView.frame))];
tableHeaderView.backgroundColor = [UIColor whiteColor];

[tableHeaderView addSubview:view1];
[tableHeaderView addSubview:self.candleTopV];
[tableHeaderView addSubview:self.lineGroupView];//it is a tableview
tableView.tableHeaderView = tableHeaderView;

the code : github: https://github.com/CoderYLZhang/tableHeaderViewTest

0

There are 0 best solutions below