jdg / MBProgressHUD

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

Change background color #510

Open OuSS-90 opened 7 years ago

OuSS-90 commented 7 years ago

It's possible to change background color in appDelegate for all MBProgressHUD ?

filograno commented 6 years ago

In the version 1.1.0 is not possible to change the background color using MBProgressHUD appearance in the AppDelegate. You can only customize the contentColor, that is the color of the indicator view.

If you want to customize the background color one option could be to subclass MBProgressHUD and override one of the show methods, for example:

@implementation MyProgressHUD
+ (instancetype)showHUDAddedTo:(UIView *)view animated:(BOOL)animated
{
    MyProgressHUD *hud = [super showHUDAddedTo:view animated:animated];
    hud.bezelView.color = [UIColor blackColor];
    hud.contentColor = [UIColor whiteColor];
    return hud;
}
@end

and use in your code: [MyProgressHUD showHUDAddedTo:self.view animated: YES];

wtg934614282 commented 4 years ago

how to change in IOS 13

bolee commented 3 years ago

@wtg934614282 set bezelView.blurEffectStyle=UIBlurEffectStyleLight