Trying to create dynamic NSMutableArrays in a foor loop
//Here's my for loop
for (Object *object in parseMethod.objects) {
}
objects is an NSMutableArray which stores the objects; based on the number of the objects I’d like to create unique array, something like:
NSMutableArray *array1;
NSMutableArray *array2;
NSMutableArray *array3;
//and so on...
NSMutableArray *array[n];
Anyone can share an answer how to achieve this?
I’m not entirely sure I understood your problem, but I think you want to create a number of arrays, based on the number of objects in another array, right? If so, try this:
Edit: Oh and by the way, you should think about your naming conventions. You’re not supposed to use lowercase class names (like you did with objectClass). And I wouldn’t name an object directly after its class’ name…