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
I found the solution:
if ([car_color isEqualToString:@"1"]) return red; if ([tipo_pdi isEqualToString:@"2"]) return blue; if ([tipo_pdi isEqualToString:@"3"]) return white;
But I don't like this 'if' style, what if I had a thousand colors? Isn't there a more automatic solution?