dismissViewController: not working

前端 未结 3 1570
梦谈多话
梦谈多话 2021-02-04 18:44

I have a view controller called vc0 which is presented like this:

[self presentViewController: vc1 animated: YES completion: nil];

And in vc1 I

3条回答
  •  深忆病人
    2021-02-04 19:14

    [self.navigationController popViewControllerAnimated:YES];
    

    did the trick for me also. In my case, I had a (iPhone) viewController that was pushed on to the stack using a push segue. Since the viewController that was initiating the segue had a navigation bar, I had to send the parent controller's navigationController the popViewControllerAnimated message instead of calling it's own dismissViewControllerAnimated:completion message.

    Ray

提交回复
热议问题