swiftwatchkitapple-watchwkinterfacetablewkinterfacelabel

Position an image and two labels in a WKInterfaceTable row


I'm building a watch kit extension for my app that includes a WKInterfaceTable. Now I'd like to add a detailTextLabel to the row and place it under the main label. I don't know why but I can only drag it next to the main label not under the primary label. Does someone know why and how I can solve it? I just want to display a detailTextLabel like in the iOS app. Thanks for your support!


Solution

  • The table row controller contains a WKInterfaceGroup which contains your both WKInterfaceLabels. You have to select Vertical as the WKInterfaceGroup's Layout attribute to put the labels on top of each other.

    enter image description hereenter image description here

    UPDATE:

    To add a WKInterfaceImage on the left side of your labels you have to use the following setup:

    enter image description here

    You need to set the following values:

    Group1:

    Image:

    Group2:

    Labels:

    You probably have to play around with the Size factors of the image and the labels group. The sum of these two width factors has to be 1.