NCTrashHeaderFooterMenu.swift 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // NCTrashHeaderMenu.swift
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 09/10/2018.
  6. // Copyright © 2018 Marino Faggiana. All rights reserved.
  7. //
  8. // Author Marino Faggiana <m.faggiana@twsweb.it>
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. import Foundation
  24. class NCTrashHeaderMenu: UICollectionReusableView {
  25. @IBOutlet weak var buttonMore: UIButton!
  26. @IBOutlet weak var buttonSwitch: UIButton!
  27. @IBOutlet weak var buttonOrder: UIButton!
  28. @IBOutlet weak var separator: UIView!
  29. var delegate: NCTrashHeaderMenuDelegate?
  30. override func awakeFromNib() {
  31. super.awakeFromNib()
  32. buttonSwitch.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "switchList"), multiplier: 2, color: NCBrandColor.sharedInstance.icon), for: .normal)
  33. buttonOrder.setTitle("", for: .normal)
  34. buttonOrder.setTitleColor(NCBrandColor.sharedInstance.icon, for: .normal)
  35. buttonMore.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "more"), multiplier: 2, color: NCBrandColor.sharedInstance.icon), for: .normal)
  36. separator.backgroundColor = NCBrandColor.sharedInstance.seperator
  37. }
  38. @IBAction func touchUpInsideMore(_ sender: Any) {
  39. delegate?.tapMoreHeaderMenu(sender: sender)
  40. }
  41. @IBAction func touchUpInsideSwitch(_ sender: Any) {
  42. delegate?.tapSwitchHeaderMenu(sender: sender)
  43. }
  44. @IBAction func touchUpInsideOrder(_ sender: Any) {
  45. delegate?.tapOrderHeaderMenu(sender: sender)
  46. }
  47. }
  48. protocol NCTrashHeaderMenuDelegate {
  49. func tapSwitchHeaderMenu(sender: Any)
  50. func tapMoreHeaderMenu(sender: Any)
  51. func tapOrderHeaderMenu(sender: Any)
  52. }
  53. class NCTrashFooterMenu: UICollectionReusableView {
  54. @IBOutlet weak var labelFooter: UILabel!
  55. override func awakeFromNib() {
  56. super.awakeFromNib()
  57. }
  58. }