当我想在 Storyboard 编辑器窗口中调整 UIViewController 的大小时,我会这样做:
- 我在 UIViewController 属性检查器中将大小设置为“freeForm”
- 我选择 View 并使用大小检查器调整她的大小
之后,uiViewController 在 Storyboard窗口中调整大小。
接下来,我选择 View Controller ,单击:编辑 > 嵌入 > 导航 Controller ,问题是导航 Controller 是全尺寸的,与 UIViewController 的尺寸不同。我找不到如何调整此导航 Controller 的大小。
最佳答案
有一个技巧可以绕过这个限制。将 View Controller 添加到 Storyboard,然后将容器 View 作为 subview 添加到它的 View 中。将该容器 View 的大小设置为您想要导航 Controller (及其子级)的大小,然后控制从容器 Controller 拖动到您的导航 Controller 。然后您可以通过标识符实例化导航 Controller ,容器 View Controller 将被忽略。
关于ios - 如何在 Storyboard编辑器中调整 UINavigationController 的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9195143/