vitalii vitalii - 14 days ago 5
iOS Question

WatchKit: vertical alignment in Table Cell

I need to have one label above another, but if labels are inside of table view cell its impossible. Label at the bottom shifted to the right, just where label on top finishes.

How to make them start from the the same X but different Y?

Thanks in advance

enter image description here

Answer

WKInterfaceGroup will allow you to accomplish this.

  1. Add a Group to the Table Row.
  2. Set the Group 'Layout' to 'Vertical' in Interface Builder.
  3. Move both Labels to subviews of the Group
  4. Adjust their 'Position' to Left/Right accordingly. WatchKit - Interface Group
Comments