NCTrashHeaderFooterMenu.swift 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. buttonMore.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "moreBig"), multiplier: 2, color: NCBrandColor.sharedInstance.icon), for: .normal)
  18. separator.backgroundColor = NCBrandColor.sharedInstance.seperator
  19. }
  20. @IBAction func touchUpInsideMore(_ sender: Any) {
  21. delegate?.tapMoreHeaderMenu()
  22. }
  23. @IBAction func touchUpInsideSwitch(_ sender: Any) {
  24. delegate?.tapSwitchHeaderMenu()
  25. }
  26. }
  27. protocol NCTrashHeaderMenuDelegate {
  28. func tapSwitchHeaderMenu()
  29. func tapMoreHeaderMenu()
  30. }
  31. class NCTrashFooterMenu: UICollectionReusableView {
  32. override func awakeFromNib() {
  33. super.awakeFromNib()
  34. }
  35. }