swift - populating WKInterfaceTable

78 Views Asked by At

following this tutorial... here

for (index, labelText) in stringData.enumerate() {
        let row = myTable.rowControllerAtIndex(index) 
        as! MyRowController
        row.myLabel.setText(labelText)

getting an error message that says:

Value of type '[String]' has no member 'enumerate'

is there a Swift code update change?

1

There are 1 best solutions below

0
Dávid Pásztor On BEST ANSWER

That's a really old tutorial, the function you're looking for is called enumerated now.

for (index, labelText) in stringData.enumerated() {
    ...
}