MBProgressHUD icon indicating copy to clipboard operation
MBProgressHUD copied to clipboard

Change background color

Open OuSS-90 opened this issue 7 years ago • 3 comments

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

OuSS-90 avatar Nov 17 '17 21:11 OuSS-90

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];

filograno avatar Dec 12 '17 14:12 filograno

how to change in IOS 13

wtg934614282 avatar Apr 10 '20 07:04 wtg934614282

@wtg934614282 set bezelView.blurEffectStyle=UIBlurEffectStyleLight

bolee avatar Feb 02 '21 10:02 bolee