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];
}
Now I want the Navigation Controller above to not resize when I rotate my ipad. I have tried
navController.view.autoresizesSubviews = NO;
This works, but there is a catch it doesn’t allow my UITableView(MoveToNewLocViewController) to scroll till the bottom. The main purpose of avoiding resizing is to avoid redrawing my huge custom UITableViewcell to fit the orientation. I know I have to resize my UiTableview after the orientation but the question is where. I tried
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration {}
-(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {}
It doesn’t seem to work. Is this because I am inserting it to a stacked container view?
Any help would be deeply appreciated.
I solved this by including the UITableView inside the UIView which is then added to the UiNavigationController as UIViewController. When the device rotates the I resize the view in the didRotateFrominterfaceOrientation Method