RoomFileBroswerCell.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // RoomFileBroswerCell.swift
  3. // DemoApp
  4. //
  5. // Created by CY zhao on 2023/7/4.
  6. //
  7. import Foundation
  8. import UIKit
  9. public let RoomFileBroswerCellHeight = 40.0
  10. class RoomFileBroswerCell: UITableViewCell {
  11. lazy var titlelabel: UILabel = {
  12. let tLabel = UILabel()
  13. tLabel.font = .systemFont(ofSize: 16)
  14. tLabel.textColor = UIColor.tui_color(withHex: "333333")
  15. return tLabel
  16. }()
  17. override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  18. super.init(style: style, reuseIdentifier: reuseIdentifier)
  19. self.initUI()
  20. }
  21. required init?(coder: NSCoder) {
  22. fatalError("init(coder:) has not been implemented")
  23. }
  24. func initUI() {
  25. self.contentView.addSubview(titlelabel)
  26. titlelabel.snp.makeConstraints {
  27. $0.left.equalToSuperview().offset(5)
  28. $0.top.equalToSuperview().offset(5)
  29. $0.right.equalToSuperview().offset(-20)
  30. }
  31. }
  32. func updateUI(model: RoomFileBroswerModel) {
  33. self.titlelabel.text = model.title
  34. }
  35. }