Je suis en train de mon application comme si (en applicationDidFinishLaunching):iphone-dev: TabBarItem aide
mytable = [[[MyTableController alloc] initWithStyle:UITableViewStylePlain] retain];
UINavigationController *mynav = [[[UINavigationController alloc]initWithRootViewController:mytable] autorelease];
[mynav.view setFrame:CGRectMake(0,0,320,460)];
UIViewController *tab1 = [[tabBarController viewControllers] objectAtIndex:0];
[mytable setTitle:@"Chronological"];
mytable.navigationController = mynav;
[tab1.view addSubview:mynav.view];
[window addSubview:tab1.view];
où s'étend MyTableController UITableController et possède une propriété de contrôleur de navigation. tabBarController est une sortie via le fichier nib principal. Il n'y a pas d'autres fichiers nib.
Je n'arrive plus à ajouter aucun bouton au contrôleur de navigation. Tout ce que je fais est ignoré. Qu'est-ce que je fais mal ici?
'[[[MyTableController alloc] initWithStyle: UITableViewStylePlain] retain]': alloc fait déjà retenir. vous retenez trop – user102008