41 lines
1.0 KiB
Swift
41 lines
1.0 KiB
Swift
//
|
|
// HomeSearchRecordTextCell.swift
|
|
// yinmeng-ios
|
|
//
|
|
// Created by duoban on 2024/4/3.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class HomeSearchRecordTextCell: UICollectionViewCell {
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
setUILayout()
|
|
|
|
}
|
|
|
|
required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
private func setUILayout(){
|
|
backgroundColor = .white
|
|
layer.cornerRadius = UIDevice.scaleWidth(width: 13)
|
|
layer.masksToBounds = true
|
|
contentView.addSubview(textView)
|
|
textView.snp.makeConstraints { make in
|
|
make.edges.equalTo(contentView)
|
|
}
|
|
}
|
|
//MARK: - 懒加载
|
|
var text:String = ""{
|
|
didSet{
|
|
textView.text = text
|
|
}
|
|
}
|
|
private lazy var textView:UILabel = {
|
|
let _textView = UILabel.getCustomLabel(font: UIFont.getScaleFont(ofSize: 12, weight: .regular),color: ThemeColor(hexStr: "#282828"))
|
|
|
|
return _textView
|
|
}()
|
|
}
|