Search code examples
iosmultilinewatchkitwkinterfacetable

iOS WatchKit - How to add a row with multiple lines to WKInterfaceTable in Storyboard


I am trying to create a table that will have rows that contain 2 lines. The top line will contain 2 Labels with 50% width each and the bottom line would have 1 slider with 100% width.

In storyboard, I can get the top line to have the 2 labels with 50% width each just fine, but whenever I add the slider, it always tries to attach it at the end of the top line instead of moving it down.

I have even sized the height for the cell properly, as well as tried playing with the alignments (left, center, right) on all objects. I even added an "adjustment" to the height of the slider thinking it would offset it to the 2nd line. Nothing seems to work.

Any suggestions?


Solution

  • You will need to add two groups to your row in the story board. The outer most group should have vertical layout. In that group you will put a group with horizontal layout at the top and the slider at the bottom. The group with the horizontal layout will have the two labels in it.