1. 程式人生 > >MBProgressHUD等待框背景色與菊花等待框顏色修改

MBProgressHUD等待框背景色與菊花等待框顏色修改

最新版本預設樣式為

  1111

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

修改後效果如下

1111