Autolayout对齐堆栈固定的3x3按钮

时间:2016-01-20 00:08:57

标签: ios xcode autolayout

我需要一些关于自动布局的帮助。我试图实现以下目标:

What I'm trying to achieve

But when I run the app I get this

最终结果应为:

  • 顶部的三个按钮
  • 以下三个按钮
  • 固定宽度和高度80x80
  • 以屏幕为中心。

This is how I used Autolayout for the above

When I fix the width and checked off top, right, bottom, and left

This is the results I get.

我希望有人可以解释一下。我以为我知道如何使用Autolayout,但我想我不会笑。

1 个答案:

答案 0 :(得分:0)

只需使用其他视图作为容器。将其水平放置并垂直居中,并固定其宽度和高度。现在,您可以根据自己的喜好定位孩子的观点。

相关问题