美文网首页
ios cell当做view用

ios cell当做view用

作者: 缘來諟夢 | 来源:发表于2020-12-02 09:14 被阅读0次

注意注册时

[_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;
}

相关文章

网友评论

      本文标题:ios cell当做view用

      本文链接:https://www.haomeiwen.com/subject/zveliktx.html