现在查看下没有设置约束,在各种尺寸的设备上显示状态

接下来,我们添加自动布局约束,首先点击PIN来创建间距约束,设置左边,顶部和右边,值为0

打开文档大纲,按住Control拖动view到mainview,从弹出菜单中选择相同的高度。

接下来,选择产品信息视图,单击销按钮,首先点击PIN来创建间距约束,设置左边,底部和右边,值为0

打开文档大纲,从菜单中选择垂直间距

现在,让我们为这两个标签定义的约束,选择标题标签,单击PIN,设置高15,左22,右22.

接下来,选择另一个标签,添加三个间距约束。

所有自动布局约束已经设置完毕,看下预览效果。

网友评论