Reputation: 1395
I have a modal view that slides up covering the visible view. Based on button presses on the modal, I'd like to pop the view it covers and push a different view so when the modal slides down again the new view is visible.
What are so strategies to accomplish this?
Upvotes: 0
Views: 518
Reputation: 11839
From the navigation controller stack you can access previous view controller, and on action you can change the view of that controller, use something like -
NSMutableArray *activeControllerArray = [self.navigationController.viewControllers mutableCopy];
// Replace your earlier view controller/view with new view controller/view , and then assign again the navigation controller's viewControllers
self.navigationController.viewControllers = activeControllerArray;
Upvotes: 1