我想基于其单元格高度的总和从另一个viewcontroller更改tableview的高度,因为它们是动态的.它可能吗?谢谢
添加在:
我基本上拥有一个UserProfileViewController,它在屏幕的一半上有一个容器视图.在那里我添加了不同的其他viewcontrollers:


在wall按钮的情况下,这是我添加viewcontroller的方式,它是后续的tableview:
- (IBAction)wallButtonPressed:(id)sender
{
//Check if there is an instance of the viewcontroller we want to display. If not make one and set it's tableview frame to the container's view bounds
if(!_userWallViewController) {
self.userWallViewController = [[WallViewController alloc] init];
// self.userWallViewController.activityFeedTableView.frame = self.containerView.bounds;
}
[self.userWallViewController.containerView addSubview:self.userWallViewController.activityFeedTableView];
//If the currentviewcontroller adn it's view are already added to the hierarchy remove them
[self.currentViewController.view removeFromSuperview];
[self.currentViewController removeFromParentViewController];
//Add the desired viewcontroller to the currentviewcontroller
self.currentViewController = self.userWallViewController;
//Pass the data needed …Run Code Online (Sandbox Code Playgroud) 在我的应用程序中,我想调整tableview的高度,当它处于编辑模式时,而不是(当为了在表视图下面编辑控件时留出空间)
该怎么做?