jdg / MBProgressHUD

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

Change blur background color #401

Closed carlosandresSanchez closed 8 years ago

carlosandresSanchez commented 8 years ago

I upgrade to the version 1.0.0.

How can i change the background color when i use [MBProgressHUD showHUDAddedTo:view animated:YES]?

I tried this, but nothing happens :

MBProgressHUD * mbProgressHUD = [MBProgressHUD showHUDAddedTo:view animated:YES];
mbProgressHUD.backgroundView.color = [UIColor blackColor];
mbProgressHUD.backgroundView.style = MBProgressHUDBackgroundStyleSolidColor;
MeGaPk commented 8 years ago

@carlosandresSanchez Solution: need use just:

[mbProgressHUD.bezelView setBackgroundColor:[UIColor darkGrayColor]];
charliebartel commented 8 years ago

@carlosandresSanchez This works for me:

[hud.bezelView setBackgroundColor:[UIColor blackColor]]; hud.contentColor = [UIColor whiteColor];

ed8009 commented 8 years ago

But how to remove the background? I tried this, but nothing happens :

[hud.bezelView setBackgroundColor:[UIColor clearColor]];
hud.contentColor = [UIColor clearColor];
MeGaPk commented 8 years ago

@ed8009 maybe:

[hud.bezelView setBackgroundColor:[UIColor clearColor]];
hud.bezelView.contentColor = [UIColor clearColor];

?

ed8009 commented 8 years ago

@MeGaPk Is it possible? hud.bezelView.contentColor

ed8009 commented 8 years ago

It seems that it works:

[progressHud.bezelView setBackgroundColor:[UIColor clearColor]];
    progressHud.bezelView.color = [UIColor clearColor];
    progressHud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
carlosandresSanchez commented 8 years ago

Well, with all the comments, I found the following:

Thanks for your help!!