AppCategoryCell.swift 791 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // AppCategoryCell.swift
  3. // O2Platform
  4. //
  5. // Created by 刘振兴 on 16/7/28.
  6. // Copyright © 2016年 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. import SDWebImage
  10. class AppCategoryCell: UICollectionViewCell {
  11. @IBOutlet weak var moduleIconImageView: UIImageView!
  12. @IBOutlet weak var moduleTitleLabel: UILabel!
  13. var appProcess:AppProcess? {
  14. didSet {
  15. if let icon = appProcess?.icon {
  16. self.moduleIconImageView.image = UIImage.sd_image(with: Data(base64Encoded: icon, options:NSData.Base64DecodingOptions.ignoreUnknownCharacters))
  17. }else{
  18. self.moduleIconImageView.image = UIImage(named: "todoList")
  19. }
  20. self.moduleTitleLabel.text = appProcess?.name
  21. }
  22. }
  23. }