NXBadgeView.swift 512 B

12345678910111213141516171819202122232425262728
  1. //
  2. // NXBadgeView.swift.swift
  3. // NXFramework-Swift
  4. //
  5. // Created by ak on 2020/11/11.
  6. //
  7. import UIKit
  8. public struct NX<Base> {
  9. public let base: Base
  10. public init(_ base: Base) {
  11. self.base = base
  12. }
  13. }
  14. public extension NSObjectProtocol {
  15. var nx: NX<Self> {
  16. return NX(self)
  17. }
  18. }
  19. public enum NXBadgeViewFlexMode {
  20. case head // 左伸缩 Head Flex : <==●
  21. case tail // 右伸缩 Tail Flex : ●==>
  22. case middle // 左右伸缩 Middle Flex : <=●=>
  23. }