nsmutablearray - How to create multidimensional array in swift? -


this question has answer here:

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

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -