简体   繁体   English

在部分页面卷曲模式视图上呈现模式视图

[英]Presenting modal view over partial page curl modal view

I have my main menu embedded in a navigation controller. 我将主菜单嵌入到导航控制器中。 The settings button performs a modal segue to show my settings page which is half a page shown using the partial page curl. 设置按钮执行模式搜索以显示我的设置页面,该页面是使用部分页面卷曲显示的一半页面。 Now on the settings I have a 'legal' button which I want to just display a full screen UITextView with all my legal stuff. 现在在设置中,我有一个“合法”按钮,我只想显示全屏的UITextView及其所有合法内容。 The problem is, when I display the legal view controller using a modal segue, it displays behind the partial page curl. 问题是,当我使用模式搜索显示法律视图控制器时,它显示在部分页面卷曲的后面。 If I try using a push segue, it crashes because there is no Navigation controller as the settings is shown modally. 如果我尝试使用推播功能,则会崩溃,因为没有导航控制器,因为设置以模态显示。

Is there a way to present a modal view over the top of a partial page curl? 有没有一种方法可以在部分页面卷曲的顶部显示模式视图?

Thanks 谢谢

Best option I can think of is managing all your segues in your initial main menu controller . 我能想到的最佳选择是在初始主菜单控制器中管理所有任务

For example, you can write a delegate method such that, if the user hits 'legal', you dismiss the modal view (from within your main menu controller's .m) using a delegate method, and then in that same method present a new modal view controller for the settings page (with it's parent being the main menu view controller, which can then have another delegate method to dismiss the legal page and present the settings menu). 例如,您可以编写一个委托方法,以便如果用户单击“ legal”,则可以使用委托方法关闭模态视图(从主菜单控制器的.m内部),然后在同一方法中显示一个新的模态设置页面的视图控制器(它的父级是主菜单视图控制器,然后可以具有另一种委托方法来关闭合法页面并显示设置菜单)。

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

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