MBProgressHUD等待框背景色与菊花等待框颜色修改

最新版本默认样式为

  MBProgressHUD等待框背景色与菊花等待框颜色修改_第1张图片

MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:self.view ];

//修改样式,否则等待框背景色将为半透明

hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;

//设置等待框背景色为黑色

hud.bezelView.backgroundColor = [UIColor blackColor];

hud.removeFromSuperViewOnHide = YES;

//设置菊花框为白色

[UIActivityIndicatorView appearanceWhenContainedIn:[MBProgressHUD class], nil].color = [UIColor whiteColor];

[self.view addSubview:hud];

[hud showAnimated:YES];

修改后效果如下

MBProgressHUD等待框背景色与菊花等待框颜色修改_第2张图片


你可能感兴趣的:(iOS)