NSMutableArrayを返すメソッドがあります。別のクラスからこのメソッドを呼び出しています。返されたNSMutableArrayを、それを呼び出したクラスの受信オブジェクトに配置する方法を知りたいです。
myClass.m
- (NSMutableArray *)getMutableArray
{
// Do some stuff
return myMutableArray
}
mycallingClass.m
- (void)getMeMyMutableArray {
// not really sure what to do here.. but something like.....
// initialize class
myClass *mc = [[myClass alloc] init];
// call myClass method
[mc getMutableArray]; // how do I get the returning value into a mutableArray in this class?
}
うまくいけば、これは理にかなっています..どんな助けもいただければ幸いです