开发者

presentModalViewControllver over a modalViewController works only once

开发者 https://www.devze.com 2023-01-28 14:16 出处:网络
For sake of simplicity I have 3 UIViewControllers named, vc0, vc1, vc2. My Flow of operations is a button in vc0 calls

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 s开发者_如何学运维imilar problem before?


I think You might be missing the allot + init for the view controllers that you want to present

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号