首页 > 代码库 > MBProgressHUD简单使用

MBProgressHUD简单使用

/ / 这种默认菊花

_deletingHUD = [[MBProgressHUDalloc] initWithView:self.view];

    _deletingHUD.labelText = @"正在删除...";

    [self.viewaddSubview:_deletingHUD];

    

    [_deletingHUDshow:YES];

 

 

 

 

 

/ / 这种带自定义图片

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

        hud.mode = MBProgressHUDModeCustomView;

        hud.labelText = @"网络已连接";

        hud.customView = [[UIImageViewalloc] initWithImage:[UIImageimageNamed:@"success"]];

        [self.view addSubview:hud];

        

        [hud show:YES];

        [hud hide:YES afterDelay:1];

MBProgressHUD简单使用