47 lines
1.3 KiB
Swift
47 lines
1.3 KiB
Swift
//
|
|
// SPHomeNineSquareContentCell.swift
|
|
// MoviaBox
|
|
//
|
|
// Created by 长沙佳儿 on 2025/6/18.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class SPHomeNineSquareContentCell: SPHomeContentCell {
|
|
|
|
override var contentModel: SPHomeContentModel? {
|
|
didSet {
|
|
exploreView.dataArr = contentModel?.list
|
|
exploreView.titleLabel.text = contentModel?.title
|
|
|
|
exploreView.snp.updateConstraints { make in
|
|
make.top.equalToSuperview().offset(contentModel?.contentTop ?? 0)
|
|
make.height.equalTo(SPHomeExploreView.contentHeight(dataArr: contentModel?.list ?? []))
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
private lazy var exploreView: SPHomeExploreView = {
|
|
let view = SPHomeExploreView()
|
|
return view
|
|
}()
|
|
|
|
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
|
contentView.addSubview(exploreView)
|
|
|
|
exploreView.snp.makeConstraints { make in
|
|
make.top.equalToSuperview().offset(0)
|
|
make.left.right.bottom.equalToSuperview()
|
|
make.height.equalTo(1)
|
|
}
|
|
|
|
}
|
|
|
|
@MainActor required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
}
|