MeetingFormRoomPickerCell.swift 963 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // MeetingFormRoomPickerCell.swift
  3. // O2Platform
  4. //
  5. // Created by FancyLou on 2020/11/25.
  6. // Copyright © 2020 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. import Eureka
  10. class MeetingFormRoomPickerCell: Cell<OOMeetingRoomInfo>, CellType {
  11. @IBOutlet weak var roomLabel: UILabel!
  12. override func setup() {
  13. super.setup()
  14. selectionStyle = .none
  15. }
  16. override func update() {
  17. super.update()
  18. if let value = self.row.value {
  19. self.roomLabel.text = value.name
  20. }
  21. }
  22. }
  23. final class MeetingFormRoomPickerCellRow: Row<MeetingFormRoomPickerCell>, RowType {
  24. required init(tag: String?) {
  25. super.init(tag: tag)
  26. cellProvider = CellProvider<MeetingFormRoomPickerCell>(nibName: "MeetingFormRoomPickerCell")
  27. }
  28. var onPresent: (() -> Void)?
  29. override func customDidSelect() {
  30. super.customDidSelect()
  31. onPresent?()
  32. }
  33. }