Reputation: 833
Is it safe to call dismissModalViewControllerAnimated within a modal view? or should it be called from the controller that initiated the modal view? If so how would I program that?
Upvotes: 0
Views: 656
Reputation: 33592
The documentation does not make it clear what's going on (e.g. is it safe to do [self.parentViewController.parentViewController dismissModalViewControllerAnimated:NO]
?), but in my testing you can dismiss the modal VC from either itself or its parent:
[self dismissModalViewControllerAnimated:NO]
[self.modalViewController dismissModalViewControllerAnimated:NO]
[self.parentViewController dismissModalViewControllerAnimated:NO]
Upvotes: 2