modalViewController 上的presentModalViewControllver 只能工作一次
为了简单起见,我有 3 个 UIViewController,分别命名为 vc0、vc1、vc2。我的操作流程是 vc0 调用中的一个按钮
[vc0 presentModalViewController:vc1]
然后在 vc1 中我在 vc1 中有另一个按钮可以调用
[vc1 presentModalViewController:vc2]
在 vc1 和 vc2 中我都有一个 X 按钮可以调用
[self dismissModalViewController];
现在第一次运行抛出该流程很好,vc1 以模态方式呈现,然后是按下正确按钮后的 vc2。忽略视图也是正确的行为。但是,当我尝试再次启动流程时,我无法从 vc1 模态地呈现 vc2。以前有其他人遇到过类似的问题吗?
For sake of simplicity I have 3 UIViewControllers named, vc0, vc1, vc2. My Flow of operations is a button in vc0 calls
[vc0 presentModalViewController:vc1]
Then in vc1 I have another button in vc1 that calls
[vc1 presentModalViewController:vc2]
In both vc1 and vc2 I have an X button that calls
[self dismissModalViewController];
Now the first run threw that flow is fine, vc1 is presented modally, followed by vc2 after the correct button presses. Dismissing the views also behaves correctly. However, when I attempt to start the flow all over again I'm unable to present vc2 modally from vc1. Has anyone else run into a similar problem before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您可能缺少您想要呈现的视图控制器的分配+初始化
I think You might be missing the allot + init for the view controllers that you want to present