I am using to typedef with somevalues in the header. how can i access the enum values and used in the application any one help me.
typedef enum{
INFO,PROD,WARN
}INFOS;
@interface ViewController : UIViewController{
INFOS infos;
}
-(NSString *)method:(INFOS)infovalue;
- (void)viewDidLoad
{
[self method:infos];
[super viewDidLoad];
}
- (NSString *) method:(INFOS) infovalue {
NSString *result = nil;
switch(infovalue) {
case INFO:
result = @"info";
break;
case PROD:
result = @"prod";
break;
case WARN:
result = @"warn";
break;
default:
result = @"unknown";
}
return result;
}
but the method not called after the view load. how can i do it.pls help me
1 Answer