nsmutablearray - How to create multidimensional array in swift? -
this question has answer here:
- multidimensional arrays in swift 7 answers
i'm trying push array type object special index inside array in new swift lang apple. should = [ [...], [...], ...]
, i've read in docs - nsmutablearray
type assigned variable automatically if it's var
, in playground throws me errors:
var arr = []; arr[0] = []; // error: cannot assign result of expression arr.insert([], atindex:0) // error: 'nsarray' not have member named 'insert'
var array2d: [[int]] = [[1,2,3,4],[5,6,7,8]]
Comments
Post a Comment