NCTrashHeaderFooterMenu.swift 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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(sender: sender)
  22. }
  23. @IBAction func touchUpInsideSwitch(_ sender: Any) {
  24. delegate?.tapSwitchHeaderMenu(sender: sender)
  25. }
  26. }
  27. protocol NCTrashHeaderMenuDelegate {
  28. func tapSwitchHeaderMenu(sender: Any)
  29. func tapMoreHeaderMenu(sender: Any)
  30. }
  31. class NCTrashFooterMenu: UICollectionReusableView {
  32. @IBOutlet weak var labelFooter: UILabel!
  33. override func awakeFromNib() {
  34. super.awakeFromNib()
  35. }
  36. }