I am setting NSMutableArray values on class2. Array is filled and retained while executing class2 functions. Problem is that I need to switch to class1 and then recall function from class2. Then, array is empty!
I think that problem comes from method I use to call class2 function, when allocating again… How to solve it? thank you
class2 *theInstance = [class2 alloc];
[theInstance saveFilesNews:llistaArxius:folderType:originType];
if you are popping from Class 2 to Class 1, then you will not able to do this. As all the objects of Class 2 will be released by that time. If this is the case then you need to pass that value to Class 1 before popping.
You can make an array in CLass 1 and from class 2 you can set that for Class1.As i think you are pushing Class 2 on Class 1, so from Class2, Class 1 will be easily accessible.