Anything wrong with this code?
- by ct2k7
I am using this to determine which view to go to next, from the result as input from UITableView. The following code isn't working, but I think it should be!
Do you see anything wrong with it?
NSString *option = [menuArray objectAtIndex:indexPath.row];
if (option == @"New Transaction"){
NTItems *nTItemsController = [[NTItems alloc] initWithNibName:@"NTItems" bundle:nil];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:nTItemsController animated:YES];
[NTItems release];}
else if (option == @"Previous Transactions"){}
else if (option == @"Reprint a reciept"){}
else if (option == @"Settings"){}
else if (option == @"Logout"){
LoginViewController *nTItemsController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:nTItemsController animated:YES];
[LoginViewController release]; }