ios cell当做view用

注意注册时

[_tableView registerNib:[UINib nibWithNibName:@"MyOrderTopCell" bundle:nil] forHeaderFooterViewReuseIdentifier:@"MyOrderTopCell"];
- (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    OrderModel * oModel =self.myData[section];
    MyOrderTopCell * hview = [[[NSBundle mainBundle] loadNibNamed:@"MyOrderTopCell" owner:self options:nil] lastObject];
    hview.model = oModel;
    
    return hview;
}

推荐阅读更多精彩内容