CMSCategoryItemCell.swift 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // CMSCategoryItemCell.swift
  3. // O2Platform
  4. //
  5. // Created by 刘振兴 on 2016/12/8.
  6. // Copyright © 2016年 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. class CMSCategoryItemCell: UITableViewCell {
  10. @IBOutlet weak var appIconImageView: UIImageView!
  11. @IBOutlet weak var appNameLabel: UILabel!
  12. @IBOutlet weak var arrowImageView: UIImageView!
  13. var cmsData:CMSData? {
  14. didSet {
  15. if let appIcon = cmsData?.appIcon {
  16. appIconImageView.image = UIImage.base64ToImage(appIcon, defaultImage: UIImage(named:"icon_cms_application_default")!)
  17. }else{
  18. appIconImageView.image = UIImage(named:"icon_cms_application_default")!
  19. }
  20. appNameLabel.text = cmsData?.appName
  21. }
  22. }
  23. override func awakeFromNib() {
  24. super.awakeFromNib()
  25. self.appIconImageView.layer.cornerRadius = 5
  26. self.appIconImageView.layer.masksToBounds = true
  27. }
  28. override func setSelected(_ selected: Bool, animated: Bool) {
  29. super.setSelected(selected, animated: animated)
  30. // Configure the view for the selected state
  31. }
  32. }