ios - How to add a NSArrays with 2 Integer dimension to NSMutableArray in Objective-C -


i have nsmutablearray , want add 2 dimensional nsarray integer parameters each time. after use values they're ids not integers.and tried @[i,j] didn't work. here code :

resault = [[nsmutablearray alloc]initwithcapacity:40];  (int i=0; i<5; i++) {    (int j=0; j<5; j++)    {       [resault addobject:@[@(i),@(j)]];    } } 

use code -

nsmutablearray*resault = [[nsmutablearray alloc]initwithcapacity:40]; (int i=0; i<5; i++) {     nsmutablearray*array = [[nsmutablearray alloc]initwithcapacity:40];     (int j=0; j<5; j++)     {         [array addobject:@[@(i),@(j)]];     }     [resault addobject:array]; } 

Comments

Popular posts from this blog

javascript - How to split the success output from an Ajax post? -

sql - Time in datatime field -

c# - Sending messages from UWP to socket.io -