OOLinkManCell.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // OOLinkManCell.swift
  3. // o2app
  4. //
  5. // Created by 刘振兴 on 2017/11/20.
  6. // Copyright © 2017年 zone. All rights reserved.
  7. //
  8. import UIKit
  9. class OOLinkManCell: UITableViewCell,Configurable {
  10. @IBOutlet weak var iconImageView: UIImageView!
  11. @IBOutlet weak var titleLabel: UILabel!
  12. @IBOutlet weak var subTitleLabel: UILabel!
  13. @IBOutlet weak var arrowTitleLabel: UILabel!
  14. override func awakeFromNib() {
  15. super.awakeFromNib()
  16. self.iconImageView.image = #imageLiteral(resourceName: "icon_?")
  17. self.iconImageView.layer.masksToBounds = true
  18. self.iconImageView.layer.cornerRadius = 20
  19. }
  20. override func setSelected(_ selected: Bool, animated: Bool) {
  21. super.setSelected(selected, animated: animated)
  22. // Configure the view for the selected state
  23. }
  24. func config(withItem item: Any?) {
  25. let model = item as! NSObject
  26. if model.isKind(of: OOPersonModel.self){
  27. let pModel = model as! OOPersonModel
  28. self.titleLabel.text = pModel.name
  29. self.subTitleLabel.text = pModel.mobile
  30. }
  31. }
  32. }