I am trying to use an array of strings dynamically access methods at runtime within my class. For now the methods are already there, eventually I want to create them. Is this possible?
For example:
bool nextLevel=NO;
for(NSString * match in gameLevels)
{
if([match isEqualToString:self.level])
{
nextLevel=YES;
}
else if(nextLevel==YES)
{
self.level=match;
nextLevel=NO;
}
}
//access method named self.level
Thank you in advance!
[self @"methodThatDoesSomething"]where the string comes from possible functuon names in an array