I have classes A and B.
Can I put these classes in the same NSMutableArray without problems in future?
Example:
NSMutableArray *maincoll = [[NSMutableArray alloc] init];
ClassA *ca = [[classA alloc] init];
ClassB *cb = [[classB alloc] init];
//here is case
[maincoll addObject:ca];
[maincoll addObject:cb];
...
Yes. No limitations. The only thing you have to be careful of is when you retrieve items from the array to verify their class (if necessary) before starting to use them.
Yes.
This may be the shortest answer I've ever posted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With