在我的代码中,我正在使用这个类:
https://github.com/gpambrozio/BlockAlertsAnd-ActionSheets
当我以这种方式按下对话框视图中的按钮时,我想调用 presentModalViewController:
BlockAlertView *alert = [BlockAlertView alertWithTitle:@"Example" message:@"Text"];
[alert setDestructiveButtonWithTitle:@"Ok" block:^{
FirstView *firstView = [[FirstView alloc] initWithNibName:@"FirstView" bundle:nil];
[self presentModalViewController:firstView animated:YES];
}];
[alert show];
但是应用程序冻结了,一分钟后打开视图,所以我的问题是如何在块完成中呈现emodalviewcontroller?