I am trying to convert my project to Swift 3.0 however I am having two error messages when working with NSNumber
and Integers
.
You should stay with or original code and just change the assignment, so that it works:
var currentIndex = 0
for item in self.selectedFolder.arrayOfTasks {
item.index = NSNumber(integer: currentIndex)
currentIndex += 1
}
As your code works fine in Swift 2, I'd expect that this is behaviour that might change in the next update.