对于 MBProgressHUD,我有以下方法:
[progressHUD performSelector:@selector(hide:)
withObject:[NSNumber numberWithBool:YES]
afterDelay:kMessageHidingDelay];
这里的延迟是 2.0,但是在 2.0 秒后它不会调用 hide。我试图在隐藏函数中放置一个断点,但它没有到达那里。任何的想法?这是完整的代码:
progressHUD = [[MBProgressHUD alloc] initWithView:viewToAttach];
// Add HUD to screen
[viewToAttach addSubview:progressHUD];
progressHUD.labelText = @"Logging In";
progressHUD.removeFromSuperViewOnHide = YES;
// Show the HUD while the provided method executes in a new thread
[progressHUD show:YES];