You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
967 B

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. //
  2. // BadgeAppearance.swift
  3. // BadgeAppearance
  4. //
  5. // Created by InKwon Devik Kim on 25/06/2019.
  6. // Copyright © 2019 InKwon Devik Kim. All rights reserved.
  7. //
  8. import UIKit
  9. public struct BadgeAppearance {
  10. public var textSize: CGFloat
  11. public var textAlignment: NSTextAlignment
  12. public var borderColor: UIColor
  13. public var borderWidth: CGFloat
  14. public var allowShadow: Bool
  15. public var backgroundColor: UIColor
  16. public var textColor: UIColor
  17. public var animate: Bool
  18. public var duration: TimeInterval
  19. public var distanceFromCenterY: CGFloat
  20. public var distanceFromCenterX: CGFloat
  21. public var font: UIFont = .sanfrancisco(.medium, size: 9)
  22. public init() {
  23. textSize = 9
  24. textAlignment = .center
  25. backgroundColor = .clear
  26. textColor = .red
  27. animate = true
  28. duration = 0.2
  29. borderColor = .themeRed
  30. borderWidth = 0
  31. allowShadow = false
  32. distanceFromCenterX = 7
  33. distanceFromCenterY = -8
  34. }
  35. }