在iOS中,呈现出modalViewController
是超级简单:有没有办法检测出有多少个模态视图控制器?
[self presentModalViewController:controller animated:YES];
或者:
[[[[[UIApplication sharedApplication] delegate] window] rootViewController] presentModalViewController:controller animated:YES];
在一个modalViewController
(如navigationController
),你可以再次提出一个modalViewController
。有没有办法检测出有多少个模态视图控制器正在呈现?否则,挂钩presentModalViewController:animated:
和dismissModalViewControllerAnimated:
将是一个好主意?谢谢!
有什么目标?也许如果你告诉我们知道这一点,我们可以帮助你。 – Peres