您如何在代码中获得自动布局中使用的标准间距的值? [英] How can you get in code the value of standard spacing used in autolayout?

查看:49
本文介绍了您如何在代码中获得自动布局中使用的标准间距的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在XCode中设置自动布局分隔时是否可以找到与Standard对应的值.

I was wondering if there is a way to find the values that correspond with Standard when you set autolayout separation in XCode.

TIA标记

推荐答案

似乎没有可以访问的常量.基于什么常量可以在自动布局中使用默认的Aqua空间吗?间距为:

There does not appear to be a constant available that you can access. Based on What constant can I use for the default Aqua space in Autolayout? the spacings are:

    父视图和子视图之间的
  • 20.0(例如,子视图的起始位置为20、20)
  • 同级视图之间的距离为8.0(例如,同一父级的两个孩子之间的距离为8.0个单位)

这篇关于您如何在代码中获得自动布局中使用的标准间距的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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