2010-12-21 46 views
0

我想发送Mutable Array及其所有对象从我的First Class到Second Class。我不知道我怎么能做到这一点,请有人告诉我的方式......如何将所有对象的可变数组发送到另一个类?

+0

看到这个[stackoverflow anwser](http://stackoverflow.com/questions/2346951/iphone-how-i-can-access-data-in-a-view-controller-class-from-another-controller/ 2347108#2347108)一切顺利。 – Warrior 2010-12-21 05:20:59

回答

1

试试这个:

yourSecondClass.mutableArray_asAMemberVariable = [[yourFirstClass mutableArray_asAMemberVariable] copy]; 

这使得副本出你的Firstclass可变数组,并将其发送给你的第二类。

0

你做一个声明可变数组,并使其对要那么只给喜欢跟着其他类属性

vc.nsmutablearray = the_array_you_want_to_send;

相关问题