简体   繁体   中英

SVProgressHUD dismiss in viewWillDisappear OK?

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.

Maybe you can check if the SVProgressHUD is being shown.

so the code in your viewWillDisappear: will look like

if([SVProgressHUD isVisible]) 
     [SVProgressHUD dismiss];

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM