PollFooterView.swift 975 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  3. // SPDX-License-Identifier: GPL-3.0-or-later
  4. //
  5. import UIKit
  6. class PollFooterView: UIView {
  7. @IBOutlet var contentView: UIView!
  8. @IBOutlet weak var primaryButtonContainerView: UIView!
  9. @IBOutlet weak var secondaryButtonContainerView: UIView!
  10. @IBOutlet weak var primaryButton: NCButton!
  11. @IBOutlet weak var secondaryButton: NCButton!
  12. static let heightForOption: CGFloat = 60 // buttonHeight(40) + 20 padding
  13. override init(frame: CGRect) {
  14. super.init(frame: frame)
  15. commonInit()
  16. }
  17. required init?(coder aDecoder: NSCoder) {
  18. super.init(coder: aDecoder)
  19. commonInit()
  20. }
  21. func commonInit() {
  22. Bundle.main.loadNibNamed("PollFooterView", owner: self, options: nil)
  23. contentView.frame = self.bounds
  24. contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
  25. self.addSubview(contentView)
  26. }
  27. }