Watchkit - 如何在Group中将元素设置为低于其他元素 [英] Watchkit - How to set the element one below other in Group

查看:187
本文介绍了Watchkit - 如何在Group中将元素设置为低于其他元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用watchkit应用程序,我想创建一个带有图像的表格行和两个标签,其中标签是一个在另一个之下,如下所示:

I am working on the watchkit app and I want to create a table row with an image and two labels where the labels are one below the other, like this:

我试过这个职位界面构建器中的选项,但没有运气。

I tried the position options in interface builder, but no luck.

标签总是在同一行:

我希望两者的x坐标相同。
请帮助。

I want the x-coordinate same for both. Please help.

推荐答案

首先,拖动到interfaceController上,然后将该组的 Layout 属性更改为 Vertical

At first, drag a Group onto the interfaceController, then change the Layout property of that group to Vertical:

然后拖动该组中的标签并相应地设置其属性:

Then drag the Labels in that group and set their properties accordingly:

如果您需要其他路线,请将另一个组添加到viewController。

If you need other alignments, add another group to the viewController.

编辑

要实现您在问题中发布的表格视图:

To achieve the table view you have posted in your question:


  1. 在表格行上放置一个组,将其布局设置为 Horizo​​ntal

  2. 将图像放入该组,位置

  3. 将另一个组放入该组,位置,布局 Vert ical

  4. 将标签放在第二组中

  1. put a group on the table row, set its layout to Horizontal
  2. put the image in that group, position Left
  3. put another group in that group, position Left, layout Vertical
  4. put the labels in that second group

看起来像这样:

这篇关于Watchkit - 如何在Group中将元素设置为低于其他元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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