I have a UITabBarController in my application.
I would like to present from one tab, another UIViewController.
So I wrote in ViewControllerA
(which
Use the presented viewController's presentingViewController
property
[self.presentingViewController dismissViewControllerAnimated:NO completion:nil];
presentingViewController?.dismissViewControllerAnimated(false, completion: nil)
You can also use this shorthand version (I don't recommend you do, but you will see it often)
[self dismissViewControllerAnimated:NO completion:nil];
dismissViewControllerAnimated(false, completion: nil)
see
Dismissing a Presented View Controller