Reputation: 816
I have the exact same problem as a earlier question xcode swift indexing forever i have spotted my problem. This array:
var VragenInformatie = [[["Spelletjeskamer",""],["Keuken",""],["Garage",""],["Binnenplaats",""],["Zitkamer",""],["Slaapkamer",""],["Studeerkamer",""],["Eetkamer",""],["Badkamer",""]], [["De Wit",""],["Pimpel",""],["Blaauw van Draet",""],["Roodhart",""],["Groenewoud",""],["Van Geelen",""]], [["Loden pijp",""],["Pistool",""],["Engelse sleutel",""],["Dolk",""],["Touw",""],["Kandelaar",""]]]
I have tried: clean, deleted derived data, and even delete workspace thingy but nothing worked. But I still need this array does anybody have an idea or suggestion how to get a work around?
UPDATE:
I gone use this array for a tableview so is there maybe an other way for tableview data source?
Thanks in regards!
Upvotes: 0
Views: 1219
Reputation: 20145
I think, the problem is the type inference, which is quite hard for your 3D array. You should give more structure to this, e.g. via tuples
let VragenInformatie: [[(String, String)]] = [
[("Spelletjeskamer",""), ("Keuken",""), ("Garage",""), ("Binnenplaats",""), ("Zitkamer",""), ("Slaapkamer",""), ("Studeerkamer",""),("Eetkamer",""), ("Badkamer","")],
[("De Wit",""), ("Pimpel",""), ("Blaauw van Draet",""), ("Roodhart",""), ("Groenewoud",""), ("Van Geelen","")],
[("Loden pijp",""), ("Pistool",""), ("Engelse sleutel",""), ("Dolk",""), ("Touw",""), ("Kandelaar","")]
]
Anyway, not a neat, clean design. Think about creating a structure or class which encapsulate your data (sorry, my Dutch is not sufficient to understand what you try to provide to a table view).
Upvotes: 2