Search code examples
iosuisegmentedcontroluser-experiencewatchkitios8.3

Segmented controls in iWatch


I would like to create a control for Apple Watch (using WatchKit) that resembles the iPhone UISegmentedControl.

enter image description here

Has anyone managed to achieve this on Apple Watch already?


I followed the suggestion of a user and used buttons and custom background colours to achieve this. However the issue I got now is that they do not align horizontally. Any way to do so?

enter image description here


Solution

  • Just add your controls into WKInterfaceGroup,set its layout to Horizontal and tweak controls width in Interface Builder.Set spacing explicitly to 0 to override default value(2 pts).Here is the screenshot that illustrates the result.

    enter image description here