BaseHUDView.swift 853 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // HUDView.swift
  3. // Naterade
  4. //
  5. // Created by Nathan Racklyeft on 5/1/16.
  6. // Copyright © 2016 Nathan Racklyeft. All rights reserved.
  7. //
  8. import UIKit
  9. public typealias HUDViewOrderPriority = Int
  10. @objc open class BaseHUDView: UIView {
  11. @IBOutlet weak public var caption: UILabel! {
  12. didSet {
  13. caption?.text = "–"
  14. // TODO: Setting this color in code because the nib isn't being applied correctly. Review at a later date.
  15. if #available(iOSApplicationExtension 13.0, *) {
  16. caption?.textColor = .label
  17. }
  18. }
  19. }
  20. public var stateColors: StateColorPalette? {
  21. didSet {
  22. stateColorsDidUpdate()
  23. }
  24. }
  25. open func stateColorsDidUpdate() {
  26. }
  27. open var orderPriority: HUDViewOrderPriority {
  28. return 10
  29. }
  30. }