如何将NSMutableArray添加到NSMutableArray Objective-c [英] How to add an NSMutableArray to an NSMutableArray Objective-c
本文介绍了如何将NSMutableArray添加到NSMutableArray Objective-c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在从Java切换到Objective-c,我遇到了一些困难。我没有太大成功地搜索了这个问题。
I am making the switch from Java to Objective-c, and I'm having some difficulty. I have searched this problem this without much success.
我有一个存储NSMutableArrays的NSMutableArray。如何向数组添加数组?
I have an NSMutableArray that stores NSMutableArrays. How do I add an array to the array?
推荐答案
您可以存储对另一个数组(或任何类型的对象)的引用)在你的数组中:
You can either store a reference to another array (or any type of object) in your array:
[myArray addObject:otherArray];
或连接数组。
[myArray addObjectsFromArray:otherArray];
这两项都记录在文档。
这篇关于如何将NSMutableArray添加到NSMutableArray Objective-c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文