iosobjective-capple-watchwkinterfacebutton

WKInterfaceButton multiple line title


How can I show a three to four line title in a WKInterfaceButton? I tried setting the size to fit content but it only shows a maximum of two lines for the title.


Solution

  • So you want multiline actionable text in your storyboard.

    For now we can not make the multiline title of the WKInterfaceButton. But there is another work around that is helpful and recommended by Apple too.

    Change the Content type of the WKInterfaceButton from Text to Group.

    Make sure its height is "Size To Fit Content".

    Now Add a WKInterfaceLabel in this Group. Make this Label's proper IBOutlet Connection. Put your Title actionable Text in this Label. Make sure Label's height is "Size To Fit Content" too.