J'ai un HomeViewController.m dans lequel je pousse SpecificViewController par self.navigationController,
SpecificViewController *specificViewController=
[[SpecificViewController alloc] initWithNibName: @ paquet "SpecificViewController": nil];
[self.navigationController pushViewController: specificViewController animé: OUI];
Et dans SpecificViewController.m insérer un sous-vue
FirstViewController *firstViewController
=[[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
[self.view insertSubview:firstViewController.view atIndex:0];
Et FirstViewController.m, il y a un tableview. La question est comment puis-je pousser un nouveau ViewController par navigationController, j'ai essayé ci-dessous, mais cela ne fonctionne pas.
-(void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
DetailTableViewController *detail =
[[DetailTableViewController alloc] initWithStyle:UITableViewStyleGrouped];
[self.navigationController pushViewController:detail animated:YES];
[detail release];
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
je encore essayé une nouvelle UINavigationController,
UINavigationController *NEWnavigationController;
NEWnavigationController=[[UINavigationController alloc] init];
[NEWnavigationController pushViewController:detail animated:YES];
mais il ne fonctionne toujours pas. Pourriez-vous me donner une suggestion?