KMCommonDefine.swift 788 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // KMCommonDefine.swift
  3. // PDF Master
  4. //
  5. // Created by tangchao on 2023/3/28.
  6. //
  7. import Foundation
  8. /*  KMCommonDefine [共用的定义] 
  9. ** 用于定义一些共用的函数、共用的通知名称、其他
  10. */
  11. // MARK: -
  12. // MARK: - 共用的函数
  13. public func KMPrint(_ items: Any..., separator: String = " ", terminator: String = "\n") {
  14. #if DEBUG
  15. print(items, separator: separator, terminator: terminator)
  16. #endif
  17. }
  18. // MARK: -
  19. // MARK: - 共用的通知名称
  20. // MARK: -
  21. // MARK: - 共用的Block
  22. typealias KMItemClickBlock<T> = (_ item: T?, _ index: Int)->()
  23. typealias KMCommonClickBlock = (_ index: Int, _ params: Any...)->()
  24. typealias KMCommonBlock = (_ params: Any...)->()
  25. typealias KMValueDidChangeBlock = (_ value: Any?, [NSKeyValueChangeKey : Any]?)->()