NSMutableArray *array = [[NSMutableArray alloc]initWithArray: [self.navigationController viewControllers]]; // 删除栈中的一个viewcontroller [array removeObjectAtIndex:2]; // 清掉栈中的所有viewcontroller并跳到指定viewcontroller [array removeAllObjects]; pxViewController *px = [[pxViewController alloc]init]; [array addObject:px]; [px release]; self.navigationController.viewControllers = array;