WKInterfaceButton multiple line title

841 views Asked by At

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.

2

There are 2 answers

0
M Zubair Shamshad On BEST ANSWER

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.

0
Drake On

For people using Xamarin, right-click on your storyboard file, and open it in Xcode Interface Builder. Click on the the label, and set the "Lines" property to 2 (or more). And make sure the size of it is set to "Size to fit content", same with any parent container/group. These properties aren't visible in code for some reason.