NCTrashHeaderMenu.swift 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // NCTrashHeaderMenu.swift
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 09/10/2018.
  6. // Copyright © 2018 TWS. All rights reserved.
  7. //
  8. import Foundation
  9. class NCTrashHeaderMenu: UICollectionReusableView {
  10. @IBOutlet weak var buttonMore: UIButton!
  11. @IBOutlet weak var buttonSwitch: UIButton!
  12. @IBOutlet weak var separator: UIView!
  13. var delegate: NCTrashHeaderMenuDelegate?
  14. override func awakeFromNib() {
  15. super.awakeFromNib()
  16. buttonSwitch.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "switchList"), multiplier: 2, color: NCBrandColor.sharedInstance.icon), for: .normal)
  17. separator.backgroundColor = NCBrandColor.sharedInstance.seperator
  18. }
  19. @IBAction func touchUpInsideMore(_ sender: Any) {
  20. delegate?.tapMoreHeaderMenu()
  21. }
  22. @IBAction func touchUpInsideSwitch(_ sender: Any) {
  23. delegate?.tapSwitchHeaderMenu()
  24. }
  25. @IBAction func touchDownSwitch(_ sender: Any) {
  26. delegate?.tapSwitchHeaderMenu()
  27. }
  28. }
  29. protocol NCTrashHeaderMenuDelegate {
  30. func tapSwitchHeaderMenu()
  31. func tapMoreHeaderMenu()
  32. }