/ / 这种默认菊花
_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];
时间: 2024-10-30 10:45:52