我在代码中有ViewControllers A和B.将self.presentingViewController呈现给前景
我按下按钮时呈现B.然后在B中添加一个导航栏,其中有一个名为“返回上一屏幕”的导航项。然后,我尝试做这样的逻辑:当按下导航项目,执行下面的代码返回到B的presentingViewController,其中,在这种情况下,我认为这是A.
[self presentViewController:self.presentingViewController animated:YES completion:nil];
可惜不显示向上。我在lldb中使用“print [self.presentingViewController class]”命令,我可以看到这个类是A.我做错了什么?
这工作正常。这很奇怪,我的代码根本不起作用。 – newguy