I'm writing a small program for iPhone. I increase the array in the same class [开发者_Python百科MyArray addObject: [NSNumber numberWithInt: MyNumber]];. I would like to gain access to this element of the array in another class. Which way can I do?
write this in your first class aArray = [[NsmutableArray alloc]initwithobject:yourobjectname mutablecopy]; set property of that nsarray to this class .now you can access this variable to other class
精彩评论