在情节提要中将 view.bottom 约束为 superview.bottom 而不是 bottomLayoutGuide [英] constrain view.bottom to superview.bottom not bottomLayoutGuide in storyboard

查看:9
本文介绍了在情节提要中将 view.bottom 约束为 superview.bottom 而不是 bottomLayoutGuide的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在界面生成器中,它只给了我将子视图限制在底部布局指南的选项,而不是超级视图.因为我有时将控制器用作容器控制器设置中的子控制器,所以我真的想约束到超级视图底部,而不是底部布局指南.

In interface builder it only gives me the option of constraining my sub view to the bottom layout guide, not the superview. Because I am sometimes using the controller as a child controller in a container controller setup, I really want to constraint to the superview bottom, not the bottom layout guide.

推荐答案

选择您的 TableView 并转到 Editor ->密码.
从那里你有 4 个选项可以固定到 superview:

Select your TableView and go to Editor -> Pin.
From there you have 4 options to pin to superview:

  • 引领空间走向 Superview
  • 到 Superview 的尾随空间
  • Superview 的顶部空间
  • Superview 的底部空间

这按预期工作.唯一的缺点是您必须手动执行固定,因为没有可用的快捷方式.

This works as expected. The only downside is that you have to perform the pinning manually, as there are no shortcuts available.

这篇关于在情节提要中将 view.bottom 约束为 superview.bottom 而不是 bottomLayoutGuide的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆