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?
views:
34answers:
1
+2
A:
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:
- From either VC, you can do
[self dismissModalViewControllerAnimated:NO]
- From the parent VC, you can do
[self.modalViewController dismissModalViewControllerAnimated:NO]
- From the modal VC, you can do
[self.parentViewController dismissModalViewControllerAnimated:NO]
tc.
2010-09-13 00:32:51