我有一个工作应用程序
在加载第一个视图之前,我在 viewWillAppear 方法中放置了一个警报:
- (void)viewWillAppear
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"MyAppp" message:@"Application will connect to Internet. Continue?"
delegate:self cancelButtonTitle:nil otherButtonTitles:@"No, quit", @"Yes", nil];
[alert show];
[alert release];
}
我可以正确点击两个按钮(是/否)...
但是......我希望代码执行停止并等待答案,但代码继续运行,连接到互联网并检索数据......
如何根据用户输入阻止视图加载?