TodoedActionCell.swift 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // TodoedActionCell.swift
  3. // O2Platform
  4. //
  5. // Created by 刘振兴 on 16/8/15.
  6. // Copyright © 2016年 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. protocol TodoedActionCellDelegate {
  10. func open(_ actionModel:TodoedActionModel)
  11. }
  12. class TodoedActionCell: UITableViewCell {
  13. @IBOutlet weak var titleLabel: UILabel!
  14. @IBOutlet weak var actionButton: UIButton!
  15. var delegate:TodoedActionCellDelegate?
  16. var actionModel:TodoedActionModel?{
  17. didSet {
  18. self.titleLabel.text = actionModel?.destText
  19. }
  20. }
  21. override func awakeFromNib() {
  22. super.awakeFromNib()
  23. self.actionButton.layer.masksToBounds = true
  24. self.actionButton.layer.cornerRadius = 5
  25. }
  26. override func setSelected(_ selected: Bool, animated: Bool) {
  27. super.setSelected(selected, animated: animated)
  28. // Configure the view for the selected state
  29. }
  30. @IBAction func openTodoedDoc(_ sender: UIButton) {
  31. self.delegate?.open(self.actionModel!)
  32. }
  33. }