All is in my title, i want to create some dynamics names, to allocate some differents UIViews but randomly. For example, i want to make :
Level1 * level1view = [[Level1 alloc] init];
So i try to make some NSString like this :
ClasseMap = [NSString stringWithFormat:@"Level%i", Map];
NomMap = [NSString stringWithFormat:@"level%iview", NumeroMap];
id nouveau = NSClassFromString(ClasseMap);
nouveau * ViewTest;
ViewTest = [self valueForKey:NomMap];
ViewTest = [[nouveau alloc] init];
But it gives me : Use of undeclared identifier 'ViewTest'. How could i fix it please ? How could i get access to some variables (for example, level1view.example = YES;) ?
Thanks for your help ! =)