Search code examples
watchkit

WatchKit change alignment of time label


in my WKInterfaceController the time is aligned right, but i want it to center. i can't find anything for my problem.

i tried to make my own time with date from the storyboard, but i can't get the standard time away. is this necessary?

  1. there is no storyboard button for alignment of the time.
  2. i can't click on the time.
  3. can't find any code snippet

enter image description here


Solution

  • You cannot access the time label. You cannot change its alignment and even the global tint that you can use to give the InterfaceController's titles a specific color does not affect the time label.

    The only thing that hides the time label is an InterfaceController that is presented modally. It is presented over the status bar and thus hides the time label.

    Apart from that there is nothing you can do about the right aligned time label.