У меня есть HomeViewController.m, в котором я нажимаю SpecificViewController на self.navigationController
,
SpecificViewController *specificViewController= [[SpecificViewController alloc] initWithNibName:@"SpecificViewController" bundle:nil];
[self.navigationController pushViewController:specificViewController animated:YES];
И в SpecificViewController.m я вставляю подвид
FirstViewController *firstViewController = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
[self.view insertSubview:firstViewController.view atIndex:0];
И в FirstViewController.м, есть таблица.Вопрос в том, как я могу выдвинуть новый ViewController с помощью navigationController, я попробую ниже, но он не работает.
-(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];
}
Я все еще пробовал новый UINavigationController,
UINavigationController *NEWnavigationController;
NEWnavigationController=[[UINavigationController alloc] init];
[NEWnavigationController pushViewController:detail animated:YES];
, ноэто все еще не работало.Не могли бы вы дать мне какое-нибудь предложение?