简体   繁体   English

嵌入在UIViewController容器中的UINavigationViewController

[英]UINavigationViewController embedded inside a UIViewController Container

I have a nav controller as one of the child view controllers to my custom view controller container. 我有一个导航控制器作为我的自定义视图控制器容器的子视图控制器之一。 There are two view controllers acting as children - the one on the left which is grey and the one on the right which is actually a navcontroller tree loaded from a storyboard which is orange. 有两个充当子级的视图控制器-左边的一个为灰色,而右边的一个实际上是从情节提要中加载的navcontroller树(橙色)。

Shown are images a. 如图所示。 before navigation b. 导航之前b。 after navigation to the next screen and pressing back. 导航到下一个屏幕并按返回。

Why does the location of the button change by itself like that? 为什么按钮的位置会像这样自身发生变化?

导航之前

导航后

使用IB中的容器视图控件来解决此问题。

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

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