2011-12-15 71 views

回答

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]; 
0

我有同样的问题。我用SVProgressHUD做了HUD,它使用模态窗口(至少在iOS8上)。