2013-08-04 41 views
0

我使用的使用,看起来像一个参数返回AA系列INTS的库:最好的办法**

INT ** OUTLIST

什么是最好的方式把它包裹在一堆NSNumber对象中(也许是一个NSArray来保存它们)?

回答

0

没有捷径,我知道。你可以这样写:

int **outList = ... 
int count = ... 
NSMutableArray *result = [[NSMutableArray alloc] initWithCapacity:count]; 

for (int idx = 0; idx < count; idx++) 
    [result addObject:@(outList[idx])]; 

希望它有帮助!