I ran into strange issue
case 5:
if(1==2) {NSLog(@"Here is a tmp stuff");}
AuthenticationViewController *authVC = [[AuthenticationViewController alloc] initWithNibName:@"AuthenticationViewController" bundle:[NSBundle mainBundle]];
[authVC setTitle:@"Authentication"];
//self.authViewController = authVC;
//[authVC release];
[self.navigationController pushViewController:authVC animated:YES];
break;
If i remove the useless if statement it fails to compile. I m unable to understand why?
You are declaring a variable in your case statement, which is illegal in C.
See the following for more info and how to solve this issue: Why can't variables be declared in a switch statement?