Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Watchkit - How to set the element one below other in Group

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:

enter image description here

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

enter image description here

The labels are always on the same line:

enter image description here

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

like image 618
pratik bhiyani Avatar asked Jan 08 '15 13:01

pratik bhiyani


2 Answers

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

enter image description here

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

enter image description here

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


EDIT

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

  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

Looks like this:

enter image description here

like image 121
zisoft Avatar answered Oct 28 '22 15:10

zisoft


You just need to change Layout of that group to Vertical

like image 24
Axadiw Avatar answered Oct 28 '22 16:10

Axadiw