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!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…