GroupPickerTableViewCell.swift 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // GroupPickerTableViewCell.swift
  3. // O2Platform
  4. //
  5. // Created by FancyLou on 2019/8/15.
  6. // Copyright © 2019 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. class GroupPickerTableViewCell: UITableViewCell {
  10. lazy public var trueImage: UIImage = {
  11. return UIImage(named: "selected")!
  12. }()
  13. lazy public var falseImage: UIImage = {
  14. return UIImage(named: "unselected")!
  15. }()
  16. @IBOutlet weak var checkImageView: UIImageView!
  17. @IBOutlet weak var groupIconImageView: UIImageView!
  18. @IBOutlet weak var groupNameLabel: UILabel!
  19. override func awakeFromNib() {
  20. super.awakeFromNib()
  21. // Initialization code
  22. self.checkImageView.image = falseImage
  23. self.groupIconImageView.image = O2ThemeManager.image(for: "Icon.icon_group")
  24. }
  25. override func setSelected(_ selected: Bool, animated: Bool) {
  26. super.setSelected(selected, animated: animated)
  27. }
  28. func loadGroupInfo(info: OOGroupModel, checked: Bool) {
  29. self.groupNameLabel.text = info.name
  30. if checked {
  31. self.checkImageView.image = trueImage
  32. }else {
  33. self.checkImageView.image = falseImage
  34. }
  35. }
  36. }