Question

Is it OK to call [SVProgressHUD dismiss] without ever showing it? The reason I want to do this is because I want the HUD to always disappear when the view disappears.

Was it helpful?

Solution

It's OK, so long as it doesn't crash LOL. It should be fine, and it's not like it'll take down the whole app or remove some critical code if it goes wrong anyhow.

Literally, it's just try it and see for now.

OTHER TIPS

Maybe you can check if the SVProgressHUD is being shown.

so the code in your viewWillDisappear: will look like

if([SVProgressHUD isVisible]) 
     [SVProgressHUD dismiss];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top