In other dynamic languages like ruby, javascript etc. you can do simply this:
switch(someString) { case \"foo\": //do something; break; cas
typedef enum { foo, bar } FooBar; - (void) switchFooBar:(NSString *) param { switch([[cases objectForKey:param] intValue]) { case foo: NSLog(@"its foo"); break; case bar: NSLog(@"its bar"); break; default: NSLog(@"its default"); break; } }