25

I've been have trouble understand this problem. If I change the variable name fifthViewController the error goes away but the view controller doesn't load.

Lost. Once again it's probably something simple.

Thanks in advance.

Here is the code:

{
FifthViewController *fifthViewController = [[FifthViewController alloc] initWithNibName:@"FifthView" bundle:nil];

fifthViewController.transactionID = transactionID;
[self.navigationController pushViewController:fifthViewController animated:NO]; 
[fifthViewController release];
 }
Michael Robinson
  • 1,439
  • 2
  • 16
  • 23
  • I could be more specific in my answer if you post a more complete implementation file. – Tim Mar 19 '10 at 02:44
  • Pretty clear error message. Try using e.g. FifthViewController *myFifthViewController. – JOM Jun 08 '10 at 16:58

1 Answers1

60

This means the variable fifthViewController is named the same as something else in your class implementation. If you mean to use that variable, drop the FifthViewController* type declaration off the first line; otherwise, change the name fifthViewController everywhere it appears in that method.

Tim
  • 59,527
  • 19
  • 156
  • 165