Files
yingmeng-ios-switf/yinmeng-ios/Modules/Home/View/HomeSearchRecordTextCell.swift

41 lines
1.0 KiB
Swift
Raw Normal View History

2024-04-03 20:06:02 +08:00
//
// 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
}()
}