如图,这样,使头部视图始终在cell的下面,
可以在
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath 代理方法里面调用
[self.tableView insertSubview:self.topView atIndex:0];
如图,这样,使头部视图始终在cell的下面,
可以在
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath 代理方法里面调用
[self.tableView insertSubview:self.topView atIndex:0];