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];
[self.navigationController pushViewController:nTItemsController animated:YES];
[NTItems release];
} else if ([option isEqualToString:@"Previous Transactions"]){
} else if ([option isEqualToString:@"Reprint a reciept"]){
} else if ([option isEqualToString:@"Settings"]){
} else if ([option isEqualToString:@"Logout"]){
LoginViewController *nTItemsController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
[self.navigationController pushViewController:nTItemsController animated:YES];
[nTIemsController release];
}
Each item/object is defined as follows:
[menuArray addObject:[NSDictionary dictionaryWithObjectsAndKeys:
NSLocalizedString(@"Logout", @"Logout"), @"title",
nil,
nil]];