0

i get this error on:

        cell.naamItem = VragenInformatie[indexPath.section][indexPath.row][0]

i have this in the same class:

    var VragenInformatie: [[[String]]] = [[[]]]

and this is how the array looks like:

var VragenInformatie: [[[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",""]]]

i don't really no what the problem is here neither do i know what subscript really means

could someone give some advise?

Cing
  • 806
  • 1
  • 11
  • 29

1 Answers1

1

I bet your naamItem is a UILabel or something like that, and you forgot to append the '.text'. If my theory is true, your code should look something like this:

cell.naamItem.text = VragenInformatie[indexPath.section][indexPath.row][0]

In any other case where the naamItem is NOT an UILabel, UITextView or UITextField, you should make sure the naamItem is of type String.

Laffen
  • 2,753
  • 17
  • 29