// // TextContentArrowCell.swift // SHECommunity // // Created by Lin on 2025/1/7. // import UIKit /// 标题+内容+箭头 class TextContentArrowCell: UITableViewCell { func configure(model: TextCellModel) { titleLab.text = model.title contentLab.text = model.content } private func setupSubviews() { contentView.addSubview(bgView) bgView.addSubview(titleLab) bgView.addSubview(contentLab) bgView.addSubview(arrowIconView) bgView.layoutChain .top() .edgesHorzontal(10) .bottom(10) titleLab.layoutChain .top(12) .left(12) .bottomToCenterYOfView(bgView, offset: 2) contentLab.layoutChain .leftToView(titleLab) .topToCenterYOfView(bgView, offset: 2) .bottom(14) arrowIconView.layoutChain .right(12) .centerY() } lazy var bgView: UIView = { let view = UIView() view.backgroundColor = .white view.cornerRadius = 8 return view }() lazy var titleLab: UILabel = { let label = UILabel() label.textColor = ThemeManager.shared.color.titleColor label.font = .systemFont(ofSize: 15, weight: .regular) label.numberOfLines = 0 return label }() lazy var contentLab: UILabel = { let label = UILabel() label.textColor = ThemeManager.shared.color.contentColor label.font = .systemFont(ofSize: 12, weight: .regular) label.numberOfLines = 0 return label }() lazy var arrowIconView: UIImageView = { let imgView = UIImageView() imgView.image = UIImage(named: "Common/arrow_black") return imgView }() override init(style: CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) selectionStyle = .none backgroundColor = .clear setupSubviews() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) // Configure the view for the selected state } }