I want to refresh and resize my Table view according to the size of no of items in the array to populate in table view when a subview is removed from a super view. I am doing it by creating a frame which increases height by 50 for each increasing item. Here is my code
- (IBAction) doneAddingUsers:(id)sender {
[self.crewTable setHidden:NO];
[self.crewTable reloadData];
self.crewTable.frame = CGRectMake(self.crewTable.frame.origin.x, self.crewTable.frame.origin.y, self.crewTable.frame.size.width, [crewArray count]*50);
NSLog(@"height: %f", crewTable.frame.size.height);
[self.view bringSubviewToFront:self.crewMembersView];
[self.crewMembersView removeFromSuperview];
}
In log it is showing the right height but in UI its not seems that height of table view is changed. I have disabled scrolling too
Thanks in advance