我创建了那里我创建一个UIProgressBarHUD表明,一些正在加载的应用程序。 我的问题是,我怎么可以禁用视图,以便可以将直到装载完成后按下什么?
我试过设置:
[self.view setUserInterationEnabled:NO];
然而,这不工作:/
下面是我使用添加UIProgressHUD的代码:
- (IBAction) showHUD:(id)sender
{
//[self.view setUserInteractionEnabled:NO];
UIProgressHUD *HUD = [[UIProgressHUD alloc]
initWithWindow:[[UIApplication sharedApplication] keyWindow]];
[HUD setText:@"Loading…"];
[HUD show:YES];
[HUD performSelector:@selector(done) withObject:nil afterDelay:1.5];
[HUD performSelector:@selector(setText:) withObject:@"Done!"
afterDelay:1.5];
[HUD performSelector:@selector(hide) withObject:nil afterDelay:4.0];
//[self.view setUserInteractionEnabled:YES];
[HUD release];
}
任何帮助将长久地感谢! - 詹姆士