If I switch between several views in my app only by using presentViewController
or pushViewController
and without using dismissViewController
or popViewController
, Can I dismiss presented view controllers at a later stage ? Thanks in advance for any help.
Asked
Active
Viewed 96 times
3

sreejesh
- 718
- 5
- 15
-
you don't switch between views by using presentViewCOntroller. You switch the viewControllers. – Teja Nandamuri Aug 30 '16 at 13:01
-
When you present it, you dismiss it. When you push it, you pop it. You cannot pop when you don't have a nav controller. You can dismiss at anypoint on anything but not on rootCOntroller. – Teja Nandamuri Aug 30 '16 at 13:02
-
@TejaNandamuri Thanks for commenting on my question. I understand that i dismiss when i present a view controller. But due to some design constraints(efficient handling of push notification between views) of my app, I cannot always dismiss view controllers. When a new push notification arrives my app crashes if I dismissed a viewController earlier. So instead of dismissing, presenting the viewController solved my issue. It in turn consumed more memory. That's why I asked the question, Can I dismiss viewControllers piled up in memory at a later stage. – sreejesh Aug 31 '16 at 04:35
1 Answers
0
Yes,You can dismiss the view controller in the later stages of the project , but it depends how you use in your project, like in navigation controller you can use push ,pop and view controller you can have present , dismiss.. etc or else you can't mix up both. For more reference Check Here.

Joe
- 859
- 2
- 10
- 27