开发者

Access to an NSMutableArray element from another class

开发者 https://www.devze.com 2023-04-01 01:18 出处:网络
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 o

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

0

精彩评论

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