if I create an object of a class, I do:
Item *item01 = [[Item alloc] init];
but how do I give it a name I have in a string? (I make this question because I have to do this in a loop, and the name of object is dynamic)
NSString *aString = [NSString stringWithFormat:@"%@", var];
Item *??? = [[Item alloc] init];
thanks!
If you want to refer the object by the name of the string, you would store your objects in NSMutableDictionary and set the key to the name.
For example: