Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tableCell 嵌套瀑布流时,在赋值的过程中出现了问题,必须多次调用后才会显示内容 #23

Open
bilibili11 opened this issue Jun 6, 2024 · 1 comment

Comments

@bilibili11
Copy link

var cellData:Any?{
didSet{

        guard let cellData = cellData as? ZZZ_HomeNoisePresetList else { return  }
        titlab.text = cellData.preset_cate_name
        //该段layout
        let layout = HDWaterFlowLayout()
        layout.secInset      = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 0)
        layout.verticalGap   = 16;
        layout.horizontalGap = 16;
        layout.headerSize    = .zero;
        layout.footerSize    = .zero;
        layout.columnRatioArr =  [NSNumber(integerLiteral: 1),NSNumber(integerLiteral: 1)]
        layout.decorationMargin = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
        let hdCellModels = cellData.noise_data.map { list in
            let model = HDCellModel()
            model.orgData = list
            model.cellClassStr = "ZZZ_HomeDoubleCollectionCell"
            model.cellSize = CGSize(width: WIDTH * 0.62, height: 82)
            return model
        }
        //该段的所有数据封装
        let secModel = HDSectionModel();
        secModel.sectionDataArr        = NSMutableArray(array: hdCellModels)
        secModel.layout                = layout
        listV.hd_setAllDataArr([secModel])
    }
}
@bilibili11
Copy link
Author

补充,原因可能是计算高度错误导致

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant