1

I'm facing the SVProgressHUD animation (hud animation not working. just showing the hud without spinning animation) issue when I enter the background and stay for 5 or more seconds and again enter into the foreground. Can anyone help me how to solve this?

Ramakrishna
  • 712
  • 8
  • 26

1 Answers1

0

in which thread you are doing that start animation .. providing the code will be better understandable for users

Fisky
  • 114
  • 5
  • 1
    installed SVProgressHUD pod. And here is code `SVProgressHUD.setDefaultMaskType(.black) SVProgressHUD.setDefaultAnimationType(.native) SVProgressHUD.setForegroundColor(AppColors.headerColor) SVProgressHUD.show(withMessage: Messages.kProgressRetrieving)`. – Ramakrishna Jun 19 '19 at 11:29
  • after that, I'm calling API to get some info from DB. – Ramakrishna Jun 19 '19 at 11:36
  • SVProgressHUD.show(withStatus: "message") ....... provide full code .. in which thread u are using this – Fisky Jun 19 '19 at 14:04
  • then make a function for showing HUD . make them in main thread . hide them also in the same . way func showHUD(with message : Striing)->Void { DispatchQueue.main.async { SVProgressHUD.show(withMessage: message) } } – Fisky Jun 20 '19 at 04:35