I presented a view controller using presentModalViewController:
, now how to close/dismiss it?
Use unwind segue instead of using RootViewController. Using unwind you can go back to any ViewController. DismissViewController always send the controller out from NavigationController. Show activity on this post.
When it comes time to dismiss a presented view controller, the preferred approach is to let the presenting view controller dismiss it. In other words, whenever possible, the same view controller that presented the view controller should also take responsibility for dismissing it.
Dismiss on next clickUse the focus trigger to dismiss popovers on the user's next click of a different element than the toggle element.
For iOS6 use this code
[self dismissViewControllerAnimated:YES completion:Nil];
instead of
[self dismissModalViewControllerAnimated:YES];
This may help you.
From the controller presented modally:
[self dismissModalViewControllerAnimated:YES]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With