hai, J'ai codé en UITableview dans la méthode comme suit. Mais quand je touche la cellule ou la ligne, il ne va pas à la page suivante (la navigation n'a pas fonctionné). Je dois déclarer conroller de navigation dans d'autres fichiers. mais j'ai codé le délégué de l'application dans applicationdidfinishmethod pour la barre d'onglets via dynamic.how puis-je lier la navigation? le code: UITableview; (TableViewController)problème dans la sélection de cellule UITable
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
SubController *nextController = [[SubController alloc] init];
[self.navigationController pushViewController:nextController animated:YES];
[nextController release];
}
appdelegation:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
tabBarController = [[UITabBarController alloc] init];
tabBarController.navigationItem.title = @" News";
TableViewController *rtbfViewController = [[TableViewController alloc]
init];
rtbfViewController.tabBarItem.title = @"News";
InfoViewController *infoViewController = [[InfoViewController alloc]
initWithStyle:UITableViewStyleGrouped];
infoViewController.tabBarItem.title = @"Info";
tabBarController.viewControllers = [NSArray
arrayWithObjects:rtbfViewController,infoViewController,nil];
tabBarController.customizableViewControllers = [NSArray arrayWithObjects:nil];
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
}