QSLLoading.swift 651 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // QSLLoading.swift
  3. // QuickSearchLocation
  4. //
  5. // Created by Destiny on 2024/12/10.
  6. //
  7. import ProgressHUD
  8. class QSLLoading {
  9. static func show() {
  10. ProgressHUD.animate(nil, .circleStrokeSpin, interaction: false)
  11. }
  12. static func showWithCancel() {
  13. ProgressHUD.animate(nil, .circleStrokeSpin, interaction: true)
  14. }
  15. static func hide() {
  16. ProgressHUD.dismiss()
  17. }
  18. static func success(text: String) {
  19. ProgressHUD.succeed(text, interaction: false, delay: 2)
  20. }
  21. static func error(text: String) {
  22. ProgressHUD.error(text, interaction: false, delay: 2)
  23. }
  24. }