jdg / MBProgressHUD

MBProgressHUD + Customizations
http://www.bukovinski.com/
MIT License
16.01k stars 3.56k forks source link

Can Hud have a timeout property to let it hide #369

Closed aozhimin closed 8 years ago

aozhimin commented 8 years ago

can MBProgressHUD have a timeout property, if the time is gone, it will dismiss it self, cause in my app, some times I show a hud in loading style, but in some case the hud dismiss not called, user can not do anything in current page!

yas375 commented 8 years ago

You can call hideAnimated:afterDelay: after presenting your HUD.

aozhimin commented 8 years ago

yep, I konw this api, but i don't want the dismiss at the specified time, for example, every time before I make a network request I show a hud, when the network callback call, I dismiss hud, For some reason not to know, the network callback not be called, then hud not dismiss, it will still show that.

aozhimin commented 8 years ago

@yas375

yas375 commented 8 years ago

You should solve the problem in your network layer. Maybe network request fails and you don't handle it? Debug and find the root problem why your completion block is not called. Don't try to mask the problem.

In any case, it's not the MBProgressHUD's issue or a reasonable feature request IMO.

aozhimin commented 8 years ago

Got it, thank you for answer me!