I want to use the following expression
-(void)SwitchCondn{
int expression;
int match1=0;
int match2=1;
switch (expression)
{
case match1:
//statements
break;
case match2:
//statements
break;
default:
// statements
break;
}
But I got
When I research I found
In order to work in Objective-C, you should define your constant either like this:
#define TXT_NAME 1
Or even better, like this:
enum {TXT_NAME = 1};
I have been using this methods since long time . Now my variable value will change in run time so I need to define in others way and i didn't want to use if else so is there any way of declaration variable others way
I have had study following
Objective C switch statements and named integer constants