I need to write a method like this:
-(void)doStuff:(int)options;
Based on the typedef enumeration as follows:
typedef enum { FirstOption, SecondOption, ThirdOption } MyOptions
What I need to do to be able to call the method this way (i.e., call the method with several parameters enabled:
[self doStuff:(FirstOption | ThirdOption)]
Does typedef enum need to be configured differently? And how do I check the parameters obtained in the method, a simple if (options == ...) ?
source share