MBProgressHUD背景色

2018-03-01  本文已影响0人  Superman168
    // 快速显示一个提示信息
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
    hud.mode = MBProgressHUDModeCustomView;
    hud.label.text = message;
    // 隐藏时候从父控件中移除
    hud.removeFromSuperViewOnHide = YES;
    // 修改Hud的背景颜色
    //修改样式,否则等待框背景色将为半透明
    hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
  // 更改为全透明的,显示动画图片
    hud.bezelView.backgroundColor = [UIColor clearColor];
    hud.customView = imageView;
    hud.alpha = 0;
    [UIView animateWithDuration:2 animations:^{
        hud.alpha = 1;
    }];
   
    return hud;
上一篇 下一篇

猜你喜欢

热点阅读