CloudFileMoveFolderCell.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // CloudFileMoveFolderCell.swift
  3. // O2Platform
  4. //
  5. // Created by FancyLou on 2019/10/25.
  6. // Copyright © 2019 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. protocol CloudFileMoveChooseDelegate {
  10. func choose(folder: OOFolder)
  11. }
  12. class CloudFileMoveFolderCell: UITableViewCell {
  13. @IBOutlet weak var chooseBtn: UIButton!
  14. @IBOutlet weak var folderNameLabel: UILabel!
  15. @IBOutlet weak var folderTimeLabel: UILabel!
  16. override func awakeFromNib() {
  17. super.awakeFromNib()
  18. self.chooseBtn.setTitleColor(base_color, for: .normal)
  19. }
  20. @IBAction func chooseAction(_ sender: UIButton) {
  21. if self.folder != nil {
  22. self.delegate?.choose(folder: self.folder!)
  23. }
  24. }
  25. var folder: OOFolder?
  26. var delegate: CloudFileMoveChooseDelegate?
  27. override func setSelected(_ selected: Bool, animated: Bool) {
  28. super.setSelected(selected, animated: animated)
  29. }
  30. //添加数据
  31. func setData(folder: OOFolder) {
  32. self.folder = folder
  33. self.folderNameLabel.text = folder.name ?? ""
  34. self.folderTimeLabel.text = folder.updateTime ?? ""
  35. }
  36. }