简体   繁体   English

使用Swift Programmaticaly将UIViewController与另一个UIViewController重叠

[英]Overlapping UIViewController with another UIViewController Using Swift Programmaticaly

I have this problem and I can't seem to find the answer so I asked here. 我有这个问题,我似乎找不到答案,所以我在这里问。 I need to overlap 2 UIViewControllers. 我需要重叠2个UIViewControllers。 It is in a navigation controller. 它在导航控制器中。 Each Controllers is using xib files as view since I am not using storyboard. 由于我未使用情节提要,所以每个控制器都将xib文件用作视图。 It needs to be overlapped since the first controller is on live feed and I cannot afford to use a screenshot for background to make the live feed stay on while the user is navigating on the second controller. 由于第一个控制器在实时供稿上,因此它需要重叠,并且我不能承受使用屏幕截图作为背景来使实时供稿在用户在第二个控制器上导航时保持打开的状态。 Any Ideas? 有任何想法吗?

try content views doc tutorial 尝试内容视图文档 教程

and the VC which you want to overlap, you will not keep it in you navigation stack, you will have to make overlapping VC, child of the VC on which you want to present it, after making child you will add child VC's view as a subview to parent's view. 以及要重叠的VC,您将不会将其保留在导航堆栈中,您将不得不制作重叠的VC,即要在其上展示的VC的子元素,在使其成为子元素之后,您需要将子VC的视图添加为子视图到父视图。 in that way both view controllers will appear to be overlapping 这样,两个视图控制器将看起来是重叠的

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

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