Tôi có một buttono trong mục điều hướng mà hành động là BUTTON_ACTION. Bằng cách nhấn nó, MBProgressHUD được kích hoạt và tác vụ hành động. nhưng "dimBackground" làm cho "ẩn" các scrren, doe không hoạt động trên thanh điều hướng, và nút có thể được nhấn một lần nữa trong MBProgressHUD. Mã này là:MBProgressHud không hoạt động trên thanh điều hướng
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;
[email protected]"Buscando Bares...";
HUD.dimBackground = YES;
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(BUTTON_ACTION) onTarget:self withObject:nil animated:YES];
Tôi tryed sử dụng:
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
Bất kỳ ý tưởng về điều đó? cảm ơn trước.
Xcode? Tại sao? Việc sử dụng một IDE khác có tạo nên sự khác biệt nào không? –