I try to close a UIViewController
after an UIAlertController
has been shown.
This is my code:
UIAlertController *alertContr
[self dismissViewControllerAnimated:YES completion:nil]
will close any view controllers that the currently displaying view (i.e., "self") is displaying. What you want to do is run this same method on the presenting view controller for "self". I.e.
[self.presentingViewController dismissViewControllerAnimated:YES completion:nil];