I have several objects that I want to use, like obj11, obj21, obj33, etc.
The choice of the correct object to use depends on some parameters defined by the user, like for example: size to use and kind of object.
so, the first number on the object name will represent the size and the second letter the kind. If the user choose the object size 2 and the object kind 1, the object to load will be "obj21".
Is there a way to reference an object based on its name as a NSString?
something like
NSString *name = [NSString stringWithFormat:@"obj%d%d", size, kind];
["use object name" doSomething];
I need something like NSSelectorFromString, but in this case, it runs a method based on its name. What I need is something like "NSObjectFromString", that references an object based on its name as string.
How do I do that? Thanks.