简体   繁体   English

模式下的弹出/推入视图

[英]Pop/push view under modal

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? 有什么策略可以做到这一点?

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;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM