tableview 使一个子视图始终在cell 下面

如图,这样,使头部视图始终在cell的下面,

可以在

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath 代理方法里面调用

    [self.tableView insertSubview:self.topView atIndex:0];

猜你喜欢

转载自blog.csdn.net/LIUXIAOXIAOBO/article/details/113985275