-->

How to dismiss a certain view controller

2019-08-21 20:00发布

问题:

how can I dismiss a view controller beside the one that the user is currently in?

I need to replace self with the view controller name, but I get SIGABRT when I do so. What do I need to do? Thanks!

[self dismissModalViewControllerAnimated:NO];

回答1:

Try

[self.parentViewController dismissModalViewControllerAnimated: YES];