I have been trying to take the length of an array and use that length to set the amount of times that my loop should execute. This is my code:
if notes.count != names.count {
notes.removeAllObjects()
var nameArrayLength = names.count
for index in nameArrayLength {
notes.insertObject("", atIndex: (index-1))
}
}
At the moment I just get the error:
Int does not have a member named 'Generator'
Seems like a fairly simple issue, but I haven't yet figured out a solution. Any ideas?