MBProgressHUD 设置透明背景

MBProgressHUD 默认使用MBProgressHUDBackgroundStyleBlur 类型

MBProgressHUDBackgroundStyleBlur使用了毛玻璃效果

,我们要把把它选择设为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了

posted on 2019-03-26 11:13  许广  阅读(1504)  评论(0编辑  收藏  举报