So, I\'ve got this definition:
typedef enum { red = 1, blue = 2, white = 3 } car_colors;
Then, I\'ve got a variable of type car_col
You could also put the values in an array.
NSArray *carColorsArray = @[@"red", @"blue", @"white"];
You can then use indexOfObject to get the index of a particular string.
car_colors carColor = [carColorsArray indexOfObject:@"blue"] + 1;