0

我在导航上推送了一个视图。现在我点击按钮进行跟踪。

    [self.navigationController popViewControllerAnimated:YES];
    FreeStuffViewController * freeStuffVC=[[FreeStuffViewController   alloc]initWithNibName:@"FreeStuffViewController" bundle:nil];
    [self.navigationController pushViewController:freeStuffVC animated:YES];
    [freeStuffVC release];

它只弹出一个视图,但力推新的 FreeStuffVc。请帮忙。

4

2 回答 2

2

试试这个:

FreeStuffViewController * freeStuffVC=[[FreeStuffViewController alloc] initWithNibName:@"FreeStuffViewController" bundle:nil];
    [self.navigationController pushViewController:freeStuffVC animated:YES];
NSMutableArray *viewArray = [[self.navigationController viewControllers] mutableCopy];
[viewArray removeObjectAtIndex:viewArray.count - 2];
self.navigationController.viewControllers = viewArray;
于 2013-01-29T09:46:33.740 回答
0

这很好用。核实

        UINavigationController *local = [[UINavigationController alloc]init];
        [local popViewControllerAnimated:NO];
        newView *nr=[[newView alloc]init];
        [self.navigationController pushViewController:nr animated:YES];
于 2013-01-29T09:58:42.647 回答