0

I would like to create a for loop for adding labels with separators programatically. How can I do this?

enter image description here

Dhaval Panchal
  • 2,529
  • 1
  • 25
  • 36
Ngo Yen Sern
  • 105
  • 4
  • 1
    Can you please share what you have tried. We are not here to do your homework. – Mika May 25 '15 at 09:41
  • I have tried using WKInterfaceLabel to code it out, I couldn't find a way to add it into the interface. In iOS, it is addsubview, how can I do this in WatchKit? – Ngo Yen Sern May 25 '15 at 09:45

1 Answers1

3

You can't programmatically create a view in WatchKit you must scope it out entirely in storyboard.

EDIT:

The way this works is that views are preloaded on the watch at the time the app is installed. The data if then gathered by an extension that is running on your phone. Once the phone has the relevant data it assignes the data to the view that is already on the watch. There is no mechanism to transfer UI components from the extension to the watch.

Thanks @NgoYenSern for the comments.

Mika
  • 5,807
  • 6
  • 38
  • 83