Edit: As Adam Washington points out, as from Beta 6, this code works as is, so the question is no longer relevant.
I am trying to create and iterate through a two d
Your original logic for creating the matrix is indeed correct, and it even works in Swift 2. The problem is that in the print loop, you have the row and column variables reversed. If you change it to:
for row in 0...2 {
for column in 0...2 {
print("column: \(column) row: \(row) value:\(array[column][row])")
}
}
you will get the correct results. Hope this helps!