Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking MBProgressHUD status if it hide/show

I'm displaying some views,webVies and while they are loading i display an ProgressHud with waiting message. I'm using an instance of that object :

MBProgressHUD * progrssHUD

Using the show and hide methods to control over loading windows. In some views i would like to add view only after the hide method is turned on - meaning no window displayed now.

How can i check from any interface what is that status of MBProgressHUD and only after status X to do something?

like image 895
vadim Avatar asked Mar 07 '26 09:03

vadim


1 Answers

If you see the implementation of MBProgresshud then you will find that when they are hiding it they are setting it's alpha 0 and when they are showing it they are setting it alpha 1.

So you can use this property to check whether it is hidden or shown. i.e

if(progrssHUD.alpha == 0){
  //perform hide operation
}else{
  //Perform show operation
}
like image 69
Sunil Pandey Avatar answered Mar 08 '26 23:03

Sunil Pandey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!