44 lines
912 B
Swift
44 lines
912 B
Swift
//
|
|
// ChatTimeCell.swift
|
|
// yinmeng-ios
|
|
//
|
|
// Created by MaiMang on 2024/3/1.
|
|
//
|
|
|
|
import UIKit
|
|
import Reusable
|
|
class ChatTimeCell: UITableViewCell, Reusable {
|
|
|
|
var model:ChatSessionProtocol? {
|
|
didSet {
|
|
if let model = model as? ChatTimeObject {
|
|
self.timeLb.text = model.text
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
|
selectionStyle = .none
|
|
backgroundColor = .clear
|
|
contentView.addSubview(timeLb)
|
|
timeLb.snp.makeConstraints { make in
|
|
make.edges.equalTo(contentView)
|
|
}
|
|
}
|
|
|
|
required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
private lazy var timeLb: UILabel = {
|
|
let label = UILabel()
|
|
label.textColor = ThemeColor(hexStr: "#A2A7B8")
|
|
label.font = UIFont.systemFont(ofSize: 12)
|
|
label.textAlignment = .center
|
|
return label
|
|
}()
|
|
|
|
}
|