Ipad 如何避免在自定义容器(stackedViewcontroller)内的UiNavigationcontroller内调整UITableView的大小

Ipad 如何避免在自定义容器(stackedViewcontroller)内的UiNavigationcontroller内调整UITableView的大小,ipad,uitableview,ios5,uinavigationcontroller,screen-orientation,Ipad,Uitableview,Ios5,Uinavigationcontroller,Screen Orientation,现在,我希望上面的导航控制器在我旋转ipad时不会调整大小。我试过了 navController.view.autoresizesSubviews=否 这是可行的,但有一个缺点,它不允许我的UITableView(MoveToNewLocViewController)滚动到底。避免调整大小的主要目的是避免重新绘制巨大的自定义UITableViewcell以适应方向。我知道我必须在定向后调整UiTableview的大小,但问题是在哪里。我试过了 MoveToNewLocViewContoller

现在,我希望上面的导航控制器在我旋转ipad时不会调整大小。我试过了 navController.view.autoresizesSubviews=否

这是可行的,但有一个缺点,它不允许我的UITableView(MoveToNewLocViewController)滚动到底。避免调整大小的主要目的是避免重新绘制巨大的自定义UITableViewcell以适应方向。我知道我必须在定向后调整UiTableview的大小,但问题是在哪里。我试过了

MoveToNewLocViewContoller *move2NewLocVC = [[MoveToNewLocViewContoller alloc] initWithLocItemArray:moveToNewLocArray andSyLocIDArray:syLocIdArray];
        [move2NewLocVC setTitle:cell.textLabel.text];


        UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:move2NewLocVC];
        navController.view.width = PSIsIpad() ? self.view.width : 100;
        [navController.navigationBar setTintColor:BLUE];


        if (navController) {

            [XAppDelegate.menuInterfaceViewController.stackViewController pushViewController:navController fromViewController:nil animated:YES];
            [navController release];
            //[viewController release];
            [moveToNewLocArray release];
            [move2NewLocVC release];
        }
它似乎不起作用。这是因为我要将其插入堆叠容器视图吗


任何帮助都将不胜感激。

我解决了这个问题,将UITableView包含在UIView中,然后作为UIViewController添加到UiNavigationController中。当设备旋转视图时,我会使用didRotateFrominterfaceOrientation方法调整视图的大小

 -(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration {}

-(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {}
-(void) didRotateFromInterfaceOrientation:  (UIInterfaceOrientation)fromInterfaceOrientation
  PSStackedViewController *stackController = XAppDelegate.menuInterfaceViewController.stackViewController;
if( [[UIDevice currentDevice] orientation] == UIInterfaceOrientationPortrait || [[UIDevice currentDevice] orientation] == UIInterfaceOrientationPortraitUpsideDown){
    [stackController setLargeLeftInset:50 animated:YES];
    self.navigationController.navigationBar.frame = CGRectMake(self.navigationController.navigationBar.frame.origin.x, self.navigationController.navigationBar.frame.origin.y, self.view.frame.size.width, self.navigationController.navigationBar.frame.size.height);
    self.move2NewLocTableView.height = self.view.height;
}
if( [[UIDevice currentDevice] orientation] == UIInterfaceOrientationLandscapeLeft || [[UIDevice currentDevice] orientation] == UIInterfaceOrientationLandscapeRight) {
    //self.navigationController.view.frame = self.tableView.frame;
    [stackController setLargeLeftInset:320 animated:YES];
    self.move2NewLocTableView.height = 700;
}