0

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?

Tom
  • 85
  • 1
  • 1
  • 9

1 Answers1

0

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

for (index, labelText) in stringData.enumerated() {
    ...
}
Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116