I would like to know how to call a method from a NSObjectClass that returns a NSMutableArray and save that returning MutableArray into a NSMutableArray in the calling class.
effectively this is how it looks
NSObject class has the method with the return value
- (NSMutableArray *)myMethod {
// do some stuff
return myMutableArray
}
The class that calls this method dose all of the initialization so I can use the myMethod method but what I am uncertian of is how to get the returning myMutableArray into a MutableArray in this class...
is it something like
TheNameOfTheNSObjectClass *myObjClass = [[TheNameOfTheObjectClass alloc] init];
anotherMutableArray = [myObjClass myMethod];
because thats what I am trying at the moment and I am getting a warning
Incompatible pointer types assigning to 'NSMutableArray *__strong' from 'TheNameOfTheNSObjectClass *'
any help would be appreciated.