开发者

Adding two arrays together

开发者_C百科

I call two feeds that both return an NSMutableArray, I then need to make the two arrays into one.

NSMutableArray *array1 = [JSONWrapper downloadFeed];
NSMutableArray *array2 = [JSONWrapper downloadFeed];

// something like: array1 += array2


Use -addObjectsFromArray::

[array1 addObjectsFromArray:array2];


NSArray *newArray = [array1 arrayByAddingObjectsFromArray:array2];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜