如何给UIbuttons的约束 [英] how to give constraints for UIbuttons

查看:257
本文介绍了如何给UIbuttons的约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为底部的按钮提供约束,如图所示。



解决方案

选择所有5个UIButton并给出等宽度约束。为所有按钮提供以下约束:



1.高度约束。



2.Leading约束。 >

2.底部约束。



4.等宽宽度约束



5.跟踪约束(如有必要)



请在这里检查:排列3个UIButtons(等宽)并排


how to give constraints for the buttons in the bottom as shown in image.

解决方案

select all 5 UIButtons and give equal widths constraints. give following constraints forr all buttons:

1.Height constraint.

2.Leading Constraint.

2.Bottom Constrain.

4.Equal Width Constraint

5.Trailing Constraint(if necessary)

check here :Arrange 3 UIButtons(of equal width) side-by-side

这篇关于如何给UIbuttons的约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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