[英]How to push a view controller as a full screen from the view controller presented as a half-modal
I am trying to push a view controller from a view controller which is presented as a bottom-half Modal. 我正在尝试从显示为下半模态的视图控制器中推送视图控制器。 When I try to push the view controller, it showed up within the bounds of the presented bottom-half view. 当我尝试推动视图控制器时,它出现在所呈现的下半视图的范围内。
How can I push a new view controller as a full screen view on to the navigation stack from a view controller which is presented as a bottom-half modal? 如何将新的视图控制器作为全屏视图从视图控制器以下半模态显示在导航堆栈上?
Here is how I solved this issue. 这是我解决此问题的方法。
Have a Master Vie wController with full screen and clear colour and add a child view controller (which is basically a bottom-half view or content view) to it, and then present master view controller. 拥有一个具有全屏和清晰色彩的Master Vie wController,并向其添加一个子视图控制器(基本上是下半视图或内容视图),然后提供主视图控制器。 Since master view controller is having full screen when you push a new view controller it shows in full screen. 由于主视图控制器在按下新的视图控制器时处于全屏状态,因此它将以全屏显示。 Content view is always bottom-half and we don't have to dismiss modal view controller. 内容视图始终是下半部分,我们不必关闭模态视图控制器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.