I have an enum holding several values:
enum {value1, value2, value3} myValue;
In a certain point in my app, I wish to check which value of the enum is now active. I’m using NSLog but I’m not clear on how to display the current value of the enum (value1/valu2/valu3/etc…) as a NSString for the NSLog.
Anyone?
This is answered here: a few suggestions on implementation
The bottom line is
Objective-Cis using a regular, oldCenum, which is just a glorified set of integers.Given an
enumlike this:Your method would look like this: