2011-12-15 70 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上)。