OOLinkManInfoCell.swift 987 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // OOLinkManInfoCell.swift
  3. // o2app
  4. //
  5. // Created by 刘振兴 on 2017/11/23.
  6. // Copyright © 2017年 zone. All rights reserved.
  7. //
  8. import UIKit
  9. class OOLinkManInfoCell: UITableViewCell,Configurable {
  10. @IBOutlet weak var titleLabel: UILabel!
  11. @IBOutlet weak var valueLabel: UILabel!
  12. @IBOutlet weak var actionButton: UIButton!
  13. override func awakeFromNib() {
  14. super.awakeFromNib()
  15. // Initialization code
  16. }
  17. override func setSelected(_ selected: Bool, animated: Bool) {
  18. super.setSelected(selected, animated: animated)
  19. // Configure the view for the selected state
  20. }
  21. func config(withItem item: Any?) {
  22. let model = item as! OOPersonCellModel
  23. titleLabel.text = model.title
  24. valueLabel.text = model.value
  25. if model.actionIconName != nil {
  26. self.actionButton.setImage(UIImage(named:model.actionIconName!), for: .normal)
  27. }
  28. }
  29. }