// // CWBaseCollectionViewCell.swift // ClockWidget // // Created by fff on 2024/11/12. // open class TSBaseCollectionCell: UICollectionViewCell { public var colAttributes:[String : Any]? public lazy var bgContentView:UIView = { let view = UIView() view.backgroundColor = .clear return view }() override init(frame: CGRect) { super.init(frame: frame) self.backgroundColor = .clear self.addSubview(bgContentView) bgContentView.snp.makeConstraints { make in make.top.leading.trailing.bottom.equalTo(0) } creatUI() dealThings() } required public init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } open func creatUI(){ } open func dealThings(){ } deinit { // debugPrint("<---deinit \(String(describing: self))") } } open class TSBaseCollectionnReusableView : UICollectionReusableView { public lazy var bgContentView:UIView = { let view = UIView() view.backgroundColor = .clear return view }() override init(frame: CGRect) { super.init(frame: frame) self.backgroundColor = .clear self.addSubview(bgContentView) bgContentView.snp.makeConstraints { make in make.top.leading.trailing.bottom.equalTo(0) } creatUI() } required public init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } open func creatUI(){ } deinit { // debugPrint("<---deinit \(String(describing: self))") } }