NCTrashHeaderMenu.swift 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. }
  26. protocol NCTrashHeaderMenuDelegate {
  27. func tapSwitchHeaderMenu()
  28. func tapMoreHeaderMenu()
  29. }