- Joined
- Dec 6, 2010
- Messages
- 4
- Reaction score
- 0
- Points
- 1
Hi,
I'm very new to this forum stuff.
Obviously I should look for previous forums to check if an answer to my question is present, but since I really don't know what the actual name for this topic I'm having a tough time finding it.
So, here's my question.
I'm trying to create multiple objects from the same class.
Objects can be created with
NSClass *someObject [ NSClass alloc] init];
but what I want to do is to have the program create them for me like this
if (//action -> create)
-find number of objects already created-
NSClass *object1 or *object(numberOfExistingObjects + 1)
[[NSClass alloc] init];
The code above won't do anything, but I just want to give you the idea.
If you know the answer please post it below, and if you know another link, then that'll be great as well.
It would be nice if you can post an example of the code too.
I'm very new to this forum stuff.
Obviously I should look for previous forums to check if an answer to my question is present, but since I really don't know what the actual name for this topic I'm having a tough time finding it.
So, here's my question.
I'm trying to create multiple objects from the same class.
Objects can be created with
NSClass *someObject [ NSClass alloc] init];
but what I want to do is to have the program create them for me like this
if (//action -> create)
-find number of objects already created-
NSClass *object1 or *object(numberOfExistingObjects + 1)
[[NSClass alloc] init];
The code above won't do anything, but I just want to give you the idea.
If you know the answer please post it below, and if you know another link, then that'll be great as well.
It would be nice if you can post an example of the code too.