ios picker多维数组

时间:2017-10-05 19:44:48

标签: arraylist picker

pickerData =    [[["A"], ["i","ii","iii"]],[["B"],["iv","v","vi","vii"]]]
}
  
    

错误:上下文类型'字符串'不能与数组文字一起使用     请告知如何使用数组

  

1 个答案:

答案 0 :(得分:0)

必须对异类文字集合类型进行处理:

试试这个:

let pickerData: [[[String]]] =
[
    [
        ["A"],
        ["i","ii","iii"]
    ],
    [
        ["B"],
        ["iv","v","vi","vii"]
    ]