MBProgressHUD 设置透明背景

MBProgressHUD 默认使用MBProgressHUDBackgroundStyleBlur 类型

MBProgressHUDBackgroundStyleBlur使用了毛玻璃效果

MBProgressHUD 设置透明背景_第1张图片

,我们要把把它选择设为MBProgressHUDBackgroundStyleSolidColor

再设置color,

// 设置字体颜色
hud.contentColor = [UIColor colorWithWhite:1.f alpha:1.f];
// 设置背景颜色
hud.bezelView.color = [UIColor colorWithWhite:0.f alpha:0.4f];
// 设置模式
hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;

就OK了

转载于:https://www.cnblogs.com/Xujg/p/10598922.html

你可能感兴趣的:(MBProgressHUD 设置透明背景)