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.
-
do you want multiline text actionable...??? are you??? – M Zubair Shamshad Jul 09 '15 at 05:34
-
i want it actionable. i know i can add WKInterfaceLabel in WKInterfaceButton but is there a way that i can change just number of lines like we do on iphone – Iqbal Khan Jul 09 '15 at 05:36
-
yes we can if we Change `WKInterfaceButton` content type to Group. then add a `WKinterfaceLabel` in it. set both of the objects height to "size to fit content". – M Zubair Shamshad Jul 09 '15 at 05:40
-
did you try this...??? – M Zubair Shamshad Jul 09 '15 at 05:43
-
i know this solution, i want to know is there a solution without adding a label in it – Iqbal Khan Jul 09 '15 at 05:48
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/82775/discussion-between-zubair-and-developer). – M Zubair Shamshad Jul 09 '15 at 05:55
2 Answers
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.

- 2,741
- 3
- 23
- 45
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.

- 2,679
- 4
- 45
- 88