2

当我尝试显示 HUD(加载数据时)时,我用 UITableView 显示模态视图,只能查看 HUD 的阴影,但它不会出现......

4

2 回答 2

1

如果没有任何代码来显示您如何将其添加到当前视图中,任何人都很难为您提供帮助。有了这个,这是我在我的一个应用程序中使用的一段代码,一个模式 UITableViewController,它在更新数据时显示 MBProgressHUD。

HUD = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:HUD];
// Regiser for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
HUD.labelText = @"Creating Company";
HUD.detailsLabelText = @"Please Wait";
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(sendNewCompanyInformation) onTarget:self withObject:nil animated:YES];
于 2012-01-05T18:49:10.020 回答
0

我遇到过同样的问题。我用 SVProgressHUD 做了 HUD,它适用于模态窗口(至少在 iOS8 上)。

于 2015-08-26T20:18:54.367 回答